If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Slow query log records everything :S

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-29-11, 08:08
jirish82 jirish82 is offline
Registered User
 
Join Date: May 2011
Posts: 1
Slow query log records everything :S

Hi All,

Mysql 5.5 on arch linux server.

Having some trouble configuring the slow query log to work properly, when I turn it on it starts logging pretty much everything, even when i set the long_query_time to 30 seconds stuff that takes only a fraction of a second keeps getting logged.

I have limited access to the database, as it's my company's system, the administrator has given me access to alter the in table version of the settings, but I can't ssh into the database server itself to work any of the text config files. What I'm wondering is if maybe there long query time is set very low in a my.cnf somewhere and is overwriting the one i set in the table settings? Would that be possible?

Any other possible causes?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 05-30-11, 04:48
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
Have a look from the command line:

mysql> show global variables like '%long%';

This will show you the setting that the server is currently configured to use. There is one caveat to using the long_query_time variable is real time and not CPU time. As a result, if your server is heavily loaded your queries may be taking longer than this setting. In your case though 30 seconds should be more than sufficient to be able to handle most queries. The default value for this parameter is 10 seconds. Lets first see if this has been set properly.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On