Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've told MySQL to log queries that take longer than a second (1 in the config)... however I'm seeing queries like this that take much less than a second....

# Time: 101108  6:39:32
# User@Host: source_member[source_member] @ localhost []
# Query_time: 0.007271  Lock_time: 0.000062 Rows_sent: 1  Rows_examined: 2635
SET timestamp=1289216372;
                                        FROM member
                                        INNER JOIN source_member.group_assoc ON (
                                                source_member.group_assoc.group_id = 121 AND
                                                source_member.group_assoc.member_id =

My settings are...

log_slow_queries        = /var/log/mysql/mysql-slow.log
long_query_time = 1

I should ask... this means that it's only logging queries that do not have any indexes at all?

share|improve this question
up vote 1 down vote accepted

What is long_query_time set to? log-long-format or log-queries-not-using-indexes active?

The most likely explanation either an incorrect setting of logging.

--log-queries-not-using-indexes and log-long-format both cause queries not using Indexes to be logged. Sometimes not using an index is faster, and this can cause a lot of log spam.

Also note that you might lock on IO somewhere. long_query_time is checked against WALL time not CPU time.

share|improve this answer
I've updated my post with my settings.... I can't find any examples of log-long-format on google – Webnet Nov 8 '10 at 18:16
And here is your explanation:… ;) – pehrs Nov 8 '10 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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