Re: Query Takes Longer Each Time Its Run
Posted by:
anthony
Date: January 28, 2011 01:38PM
Enabled the slow query log and restarted the server. Ran the query 8 times.
Here is the slow query log from mysqldumpslow:
Reading mysql slow query log from dbn01-slow.log
Count: 8 Time=20.47s (163s) Lock=0.00s (0s) Rows=22.0 (176), root[root]@localhost
( SELECT
users.FirstName,
users.LastName,
The run time of the 8 queries was:
2.3
8.3
13.4
18.32
23.19
27.97
32.70
37.4
Each run the CPU pegs at 99.9:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23805 mysql 18 0 4442m 819m 5248 S 99.9 5.1 2:16.42 mysqld
We built two identical machines and both exhibit the exact same issue. I thought it may have been MySQL5.5 on CentOS 5.5 so I reinstalled the second server with 5.1. Its running the same OS and the same MySQL version now as our production db server, but this machine has twice the CPU power and twice the RAM. I used the same my.cnf as our production server. On this machine, on the same data with the same indexes the query runs in 1.5 seconds consistently, still not the .4 were getting off the production server.
So, I really don't know where to go from here. What's the feeling on this? MySQL? OS? Hardware? We were looking to increase performance with an updated server and MySQL not go backwards lol.
Subject
Views
Written By
Posted
4089
January 26, 2011 02:59PM
1589
January 27, 2011 02:04PM
1570
January 27, 2011 02:35PM
1572
January 27, 2011 10:35PM
1651
January 27, 2011 10:59PM
1547
January 28, 2011 10:02AM
Re: Query Takes Longer Each Time Its Run
2094
January 28, 2011 01:38PM
1478
January 29, 2011 01:18AM
1431
January 30, 2011 07:20PM
1289
January 30, 2011 11:02PM
1492
January 31, 2011 01:22AM
1586
January 31, 2011 01:25AM
1441
February 01, 2011 12:38AM
1546
February 01, 2011 12:56AM
1493
February 01, 2011 01:23PM
1730
February 01, 2011 08:41PM
2244
February 03, 2011 02:04PM
1694
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.