v.21.3New Feature
New Query Concurrency Control Settings for MergeTree Engine in Tables
Tables withMergeTree*engine now have two new table-level settings for query concurrency control. Settingmax_concurrent_querieslimits the number of concurrently executed queries which are related to this table. Settingmin_marks_to_honor_max_concurrent_queriestells to apply previous setting only if query reads at least this number of marks. #19544 (Amos Bird).
Why it matters
These settings allow limiting the number of concurrently executed queries related to a specific table, helping to prevent resource contention and improve cluster stability. Themin_marks_to_honor_max_concurrent_queries setting ensures that the concurrency limit applies only to queries reading a significant amount of data (measured in marks), avoiding unnecessary restriction of lightweight queries.How to use it
Users can configure these settings at the table level by settingmax_concurrent_queries to limit concurrent queries for that table and min_marks_to_honor_max_concurrent_queries to specify the minimum number of marks a query must read for the concurrency limit to apply. This can be done via the ALTER TABLE command or during table creation.