v.21.10New Features
Add log_queries_probability setting for sampling queries in query_log
Add log_queries_probability setting that allows user to write to query_log only a sample of queries. Closes #16609. #27527 (Nikolay Degterinsky).Why it matters
This feature helps reduce the volume of logged queries by recording only a subset based on a specified probability, easing storage requirements and improving log manageability while still capturing useful diagnostic data.How to use it
Set thelog_queries_probability setting to a decimal value between 0 and 1 to control the fraction of queries logged. For example, setting log_queries_probability = 0.1 will log approximately 10% of the queries into query_log.