December 31st, 2012, 11:19 AM
Benmarking Results Seem Strange
I recently migrated my database from one computer to another which only contains 2 tables. One table Company has 3 million records and the other Contact has 18 million records. I ran Select count(*) on each of the tables on both computers and the resultant times have got me stumped.
Two computers are 1) Intel i5 with 8GB RAM and 2) P4 with 3GB.
For computer 1, results from Company=15sec & Contact=8sec
For computer 2, results from Company=18sec & Contact=275sec.
What i find strange is that the Contact query returned faster on Computer1 even though there are 6times the number of records. Secondly, and what i'm most interested in, is why computer 2 took 275sec for Contact, whereas, the same query on computer 1 only took 8sec.
I believe mysql is configured identically on both machines as i used mysqldatadump to migrate.
Any ideas on what could be causing the differences?
December 31st, 2012, 12:01 PM
The hardware is different. The second computer probably ran low on memory and had to start swapping. Also a P4 is massively slower than an I5. There are various other hardware related things that could have affected it too, like the speed of the disk. However, the memory is probably the biggest issue.
There's not really enough information available to answer this. Maybe it the data it needed was cached somewhere. Maybe you have different indexes on the tables. Maybe one of the tables needs re-analyzed or re-optimized. Maybe the table engines are different. etc.