Slow query log logs query < long_query_time


after a search in the forums and finding several people having the same problem, I can’t find a valid answer.

Server version: 5.5.30-30.2-log Percona Server (GPL), Release rel30.2, Revision 508

| long_query_time | 5000.000000 | milliseconds I think

I still get:
SET timestamp=1368927144;
select * from lbtest;

Time: 130519 3:32:27

User@Host: jdbcReplication[jdbcReplication] @ []

Thread_id: 37942 Schema: view_hc Last_errno: 0 Killed: 0

Query_time: 0.000213 Lock_time: 0.000094 Rows_sent: 1 Rows_examined: 13 Rows_affected: 0 Rows_read: 13

Bytes_sent: 795

and the logfiles is going to eat up the disk.
I would say, every statement is logged

How do I configure the percona Server to log only query which take longer “x” seconds?

I would assume
| slow_query_log | ON |
| slow_query_log_file | /path/to/logfile |
| long_query_time | 5000.000000 |

but that does not the trick.


Check that the variable log-queries-not-using-indexes is not enabled. With that variable enabled MySQL will log every issue that doesn’t use indexes, even if the query is faster than long_query_time.

Yes, I think that solved the problem, but it would be nice to have both.

Thank you!

I didn’t noticed that the my.cnf - generated by the Percona tools - had - log_queries_not_using_indexes=1… changed to log_queries_not_using_indexes=0 - and life it looking more normal for my slowlogs again.

Would be nice if we could log log_queries_not_using_indexes - to a log called - log_queries_not_using_indexes.log :slight_smile: ( and not to the slow log ).