The log_slow_rate_limit variable defines the fraction of queries captured by the slow query log. A good rule of thumb is to have approximately 100 queries logged per second. For example, if your Percona Server instance processes 10_000 queries per second, you should set log_slow_rate_limit to 100 and capture every 100th query for the slow query log.


When using query sampling, set log_slow_rate_type to query so that it applies to queries, rather than sessions.

It is also a good idea to set log_slow_verbosity to full so that maximum amount of information about each captured query is stored in the slow query log.

See also

MySQL Server 5.7 Documentation: Setting variables

Table Of Contents

Previous topic

Query Response Time Plugin

Next topic


Contact Us

For free technical help, visit the Percona Community Forum.
To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.