[MDEV-33144] Implement the Percona variable slow_query_log_always_write_time Created: 2023-12-31  Updated: 2024-01-20

Status: In Testing
Project: MariaDB Server
Component/s: None
Fix Version/s: 11.5

Type: Task Priority: Major
Reporter: Michael Widenius Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Documentation from Percona:
This variable can be used to specify the query execution time after which the query will be written to the slow query log. It can be used to specify an additional execution time threshold for the slow query log, that, when exceeded, will cause a query to be logged unconditionally, that is, log_slow_rate_limit will not apply to it."

The Percona implementation shows that slow_query_log_always_write_time only comes into effect for queries longer than long_query_time.



 Comments   
Comment by Michael Widenius [ 2023-12-31 ]

Commit message:

MDEV-33144 Implement the Percona variable slow_query_log_always_write_time

This task is inspired by the Percona implementation of
slow_query_log_always_write_time.

This task implements the variable log_slow_always_query_time (name matching
other MariaDB variables using the slow query log). The default value for
the variable is 0, which makes MariaDB compatible with older installations.

For queries with execution time longer than log_slow_always_query_time
the variables log_slow_rate_limit and log_slow_min_examined_row_limit
will not ignored and the query will be written to the slow query log
if there is no other limitations (like log_slow_filter etc).

Other things:

  • long_query_time internal variable renamed to log_slow_query_time.
  • More descriptive information for "log_slow_query_time".
Comment by Michael Widenius [ 2023-12-31 ]

This code can be found in bb-11.5-monty

Generated at Thu Feb 08 10:36:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.