Home » Performance » MySQL » MicroSeconds Slow Query patch
MicroSeconds Slow Query patch [message #190] Mon, 25 September 2006 20:40 Go to previous message
aronrosenberg
Messages: 16
Registered: September 2006
Junior Member
We have been playing with the MicroSecond patch that was on the blog a week or so ago.

The basic patch seems to work some times, however there appears to be some strange behavior or missing documentation on how to set the intial value or change it while in operation.

Reading the code, you seem to take the .cnf option as microseconds. So if I want the slow query time to be 500ms, I would set
long_query_time = 500000
log-slow-queries = /var/log/mysql-slow.log

in the my.cnf file

When I then startup mysql, I use show variables and see the value has been set to 0.500000 (floating point 1/2 sec, so would seem correct) and slow query logging is on.

If I then run a query using the command line client that takes .72 seconds, nothing shows up in the logs.

If I set the long_query_time = 0 in the cnf file, then everything shows up with proper microsecond timing. However any value other than 0 doesn't seem to work properly.

for changing it at run time is the proper syntax:

set long_query_time=0.5; or
set long_query_time=500000;

Also, set GLOBAL doesn't work for long_query_time

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:MySQL instalation - OS, Version
Next Topic:Optimal database structure
Goto Forum:

  


Current Time: Thu Jul 9 18:08:01 EDT 2009

Total time taken to generate the page: 0.02158 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.