What are the best practices regarding the slow query log? Should it be active in production environment? If so, what would be a reasonable long query time? I know its different for every application, but on general, what would you set it in a data warehouse application with a mysql database of 15gb? Thank you very much

1 Answer 1


"I know its different for every application"

15G is not a large data-set unless you tell me it's a single table! Your data can be contained in innodb-buffer-pool and performance should be better.

Importantly, you should make sure your queries are well written and tables are indexed correctly. (log-queries-not-using-indexes)

I'd start with 1 Sec and review the amount of queries getting logged and work on improvements. long-queyr0time is dynamic and you should be able to play with it depending on load it generates.

  • Hi and thanks a lot for you answer, what about performance when the log is active? Wont the log writing affect it?
    – user69153
    Commented Oct 29, 2015 at 16:10
  • Not as much as the slow query until you fix all
    – mysql_user
    Commented Oct 29, 2015 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.