Is a JDBC connection available with MySQL slower than with Derby, for example?

I use

  • Tomcat
  • C3p0 (JNDI configured inside Tomcat)
  • MySQL (InnoDB) / Derby (not implemented) as a database
  • EHCache (in memory)
  • Hibernate
  • Testmachine Launches WinXP

I used Derby for development and wanted to switch to MySQL. I was surprised to see that with MySQL my tests were about 50% slower than with Derby.

My Testscenario:

  • Around 2000 Choice, varying in complexity, but none of them uses more than one compound. All SQLs use indexes
  • Ehcache is populated with a Run installation. After that, I run Testscenario at least 50 times to overcome the effects of Optimizer / GC

I checked that the cache is being used. There are NO real SQL queries entering the database. So I just think the connection creation time slows down the MySQL tests.

+6
mysql derby jdbc c3p0 ehcache
source share

No one has answered this question yet.

See related questions:

1086
How to connect to MySQL database in Python?
614
The host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server
304
JDBC pooling options: DBCP vs C3P0
234
Java connection to MySQL database
4
Hibernate4 + c3p0 + Derby - Memory leak at Tomcat stop or web application reload
3
Deploying Multiple Connections
one
Using two different databases with the same hibernation mapping files
one
MySQL DB connection without using JDBC in Java (JSP / Servlets)
one
Testing. The best built-in database to use.
0
Network latency in Hibernate / c3p0 / MySQL

All Articles