MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 31st, 2012, 10:19 AM
Uncle_Ed Uncle_Ed is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 Uncle_Ed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 16 m 31 sec
Reputation Power: 0
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?

thanks,
-ed

Reply With Quote
  #2  
Old December 31st, 2012, 11:01 AM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,931 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 7 h 43 m 47 sec
Reputation Power: 7053
Quote:
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.

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.

Quote:
What i find strange is that the Contact query returned faster on Computer1 even though there are 6times the number of records.

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.
__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Benmarking Results Seem Strange

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap