Okay, this is likely an obvious screw up on my part. Everything is running fine except for one issue: MySQL is taking over ten times as long to do a query as MS Access. I refuse to believe this is a valid benchmark.
The Windows and Linux versions are using the exact same code though JDBC, but I phpMySql gives the same time for a query, so I don't think it's JDBC overhead. Both are running on Sun Java 1.6 but it's possible the Windows and Linux clients could be different.
The query itself returns 9,000 recordsets, and both databases are indexed on every column (this is for benchmarking a system, I'll eliminate unneeded ones later).
So the real possible places are how the services are running, the connection, or the hardware.
So here's how it breaks down:
Windows: Access running as part of office, connection string is "jdbc:odbc:Driver={Microso
ft Access Driver (*.mdb)};DBQ=c:/test.mdb;D
riverID=22
;READONLY=
true}", on a 2.4 Ghz Core 2 Quad, 3GB ram.
Ubuntu server: MySQL default install (apt-get), connection string is "jdbc:mysql://localhost/te
st", on a 2 GHz Core 2 Duo, 4GB RAM.
Even if multiprocessing is used to its fullest I don't see how it would give more than a 3 times speed increase, and there is no way it's that efficient. Top shows nothing of any significance is running in the background on the Linux machine, while the Windows machine is running, well, everything.
The annoying part is that the whole comparison scales smoothly, queries that take 200ms on MySQL are taking 30ms on Access, and queries that take 1500ms on MySQL are taking 140ms on Access.
So it has to be a configuration issue of some sort. Or maybe the quad core really is that much more efficient?
I'd appreciate any hints as to what I screwed up, because I know I did something wrong.
Start Free Trial