I use
- Tomcat
- C3p0 (JNDI configured inside Tomcat)
- MySQL (InnoDB) / Derby (not embedded) as Database
- EHCache (in Memory)
- Hibernate
- Testmachine runs WinXP
I used Derby for development and wanted to switch to MySQL. I was surprised to see that with MySQL my Tests were approximately 50% slower than with Derby.
My Testscenario :
- Approximately 2000 Selects, varying in complexity, but none used more than one join. All SQLs use Indexes
- Ehcache is filled up with a setup Run. After that I run the Testscenario at least 50x to overcome Optimizer/GC Effects
I verified that the cache is in use. There are NO real SQLs coming to the database. So I just guess it's the connection creation time which slows the MySQL tests down.