Sunday, 15 September 2013

DBCP Multi-threaded connection pool is slower than single-threaded

DBCP Multi-threaded connection pool is slower than single-threaded

For some reason, even when using BoneCP and other libraries, the
multi-threaded benchmark is running slower than the single threaded one.
I assumed that, because there were more connections, the multi-threaded
version will have a lot shorter duration on it however the code (below)
seems to say otherwise.
I am using the DBCP library (I've also tried BoneCP, same result) with the
MySQL Connector/J driver.
Does this driver not support multi-threaded connections or am I doing this
wrong?
You can view the code that I have tested here.

No comments:

Post a Comment