Adjust MySQL slow queries log?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Adjust MySQL slow queries log?

Post by JAB Creations »

I just figured out how to log MySQL queries though I think my question warrants a new thread (plus others may be able to find the answer I am seeking now better with a separate thread in the future). I enabled all the logging function (my system is only used for local development so performance isn't an issue...I'm not surfing my local sites when I play an occasional video game any way :mrgreen:).

Any way I was wondering if there is a way to adjust the "bar" for slow queries...in a sense that when I surfed my own site quickly to see if any queries would be logged as slow (and no queries were) I would like to manually decrease the execution time (or whatever the measurement is) at small increments (make it more sensitive by making it easier for queries to be logged as "slow")...re-surf my site, and see if any queries are logged as slow in the slow queries log after adjusting the sensitivity...and of course repeat until I find something.

If this is possible I am wondering how low I should adjust it? I mean obviously there is a reasonable amount of resource/time/etc that queries are going to use.

Thoughts please?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Adjust MySQL slow queries log?

Post by Eran »

Post Reply