Bug #34308 Please provide SQL_NO_SLOW_LOG_ENTRY feature
Submitted: 5 Feb 2008 13:21 Modified: 6 Feb 2008 19:35
Reporter: Carsten Pedersen Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: DML Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: SELECT, slow log

[5 Feb 2008 13:21] Carsten Pedersen
Just like we can turn caching of query result on and off as needed, more fine-grained control of slow-logging ought to be provided.

Under most circumstances, slow-logging queries which use no indexes is a good thing. But there are a number of cases where the programmer may specifically choose to perform a query with no index usage, without this being invalid or even bad. 

Please consider implementing SQL_NO_SLOW_LOG_ENTRY which may be used to specifically prevent individual queries from being logged in the slow log.

How to repeat:
This is a feature request

Suggested fix:
This is a feature request
[5 Feb 2008 15:39] Brian Papantonio
I would take advantage of this feature!
[6 Feb 2008 8:29] Eric Bergen
I wrote a patch for this some time ago that applies against 5.0.41. It's based on sql_log_bin and applies against 5.0.41. I can sign it over to mysql if there is interest.

It adds a sql_log_slow session variable that works like sql_log_bin. It also patches mysqldump to wrap insert statemens in set sql_log_slow so that full insert queries aren't written to the slow query log when it's imported. 


[6 Feb 2008 19:35] Valeriy Kravchuk
Thank you for a reasonable feature request.