I making a webcrawler and each thread makes insertion of pages and links constantly. I must have a database connection per thread or share one connection to them?
I making a webcrawler and each thread makes insertion of pages and links constantly.
Share
You would typically handle this situation using some sort of database connection pool, which can manage the lifetime of your database connections for you. In Java, the Apache Commons DBCP library is often used for this, although if you are using other frameworks, they may have that functionality built in.