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
3999
January 26, 2011 02:59PM
1542
January 27, 2011 02:04PM
1533
January 27, 2011 02:35PM
1527
January 27, 2011 10:35PM
1613
January 27, 2011 10:59PM
1511
January 28, 2011 10:02AM
Re: Query Takes Longer Each Time Its Run
2057
January 28, 2011 01:38PM
1441
January 29, 2011 01:18AM
1396
January 30, 2011 07:20PM
1256
January 30, 2011 11:02PM
1449
January 31, 2011 01:22AM
1554
January 31, 2011 01:25AM
1401
February 01, 2011 12:38AM
1519
February 01, 2011 12:56AM
1470
February 01, 2011 01:23PM
1703
February 01, 2011 08:41PM
2209
February 03, 2011 02:04PM
1667
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.