Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Unanswered: 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?


  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    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
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts