MySQL Forums
Forum List  »  Performance

Query Takes Longer Each Time Its Run
Posted by: anthony
Date: January 26, 2011 02:59PM

We currently have a MySQL 5.1 production server running on CentOS 5.5. The database has about 5 millions rows. We have a fairly complex query used to generate a report which involves multiple table joins. Its fully indexed and optimized. On our production server, it runs consistently in about .4 ms.

We have built a new system with twice the ram running on CentOS 5.5 and MySQL 5.5.
I've tweaked the config file on the new machine with similar settings as our current production machine, adjusting some things to take advantage of the additional memory. I did a mysqldump of the current production database system and the imported it into the new 5.5 system.

The problem is the same query which runs on the production system in ~.4 ms take ~2.5 seconds on the new machine. Even worse, re-running it over and over consistently adds ~5 to the run time (ie 2.5, 8, 13.5 seconds ...). The tables and indexes are identical.

I've never seen this issue and have no idea what to look for which could be causing this. Let me know what relevant information I can post in helping to solve this.

Thanks,
Anthony

Options: ReplyQuote


Subject
Views
Written By
Posted
Query Takes Longer Each Time Its Run
3998
January 26, 2011 02:59PM
1533
January 27, 2011 02:35PM
1611
January 27, 2011 10:59PM
2057
January 28, 2011 01:38PM
1393
January 30, 2011 07:20PM
1447
January 31, 2011 01:22AM
1554
January 31, 2011 01:25AM
1399
February 01, 2011 12:38AM
1517
February 01, 2011 12:56AM
1467
February 01, 2011 01:23PM
1701
February 01, 2011 08:41PM
2207
February 03, 2011 02:04PM
1664
February 15, 2011 09:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.