Select blog: [Overview] [Travel] [News] [Consumer] [Computing]
Select skin: [basic] [custom] [natural_pink] [nifty_corners] [originalb2] [skinners_guide] [wpc_default]

Computing



Tracking slow or long MySQL queries

2007-05-26

01:38:46 Permalink Tracking slow or long MySQL queries   English (EU)

Categories: web, 80 words

I noticed that sometimes MySql queries tend to last for a long time on my website.
To track this I have added the following in /etc/mysql/my.cnf

log-slow-queries=/var/log/mysql/long-queries.log
long_query_time = 1

This creates a log file (/var/log/mysql/long-queries.log) where it is possible to find which queries lasted more than the time (in seconds) specified on the second line.

More info at http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html


Send feedback PermalinkPermalink

Trackback address for this post:

http://blogs.delerue.org/htsrv/trackback.php/44

Comments, Trackbacks, Pingbacks:

No Comments/Trackbacks/Pingbacks for this post yet...

Leave a comment:


Your email address will not be displayed on this site.

Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
Options: (Line breaks become <br />)
(Set cookies for name, email & url)

:: Archives

[Login...] [Register...]


Powered by b2evolution