use_top_k_dynamic_filtering
Enable dynamic filtering optimization when executing aORDER BY <column> LIMIT n query.
When enabled, the query executor will try to skip granules and rows that will not be part of the final top N rows in the resultset. This optimization is dynamic in nature and latency improvements depends on data distribution and presence of other predicates in the query.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
use_top_k_dynamic_filtering_for_variable_length_types
Allowuse_top_k_dynamic_filtering to apply when the sort column has a variable-length data type (e.g. String, Array, Map, Tuple containing variable-length elements).
For such types, the per-row threshold comparison performed by the dynamic filter can outweigh its savings when the column’s lexicographic minimum dominates (e.g. mostly empty strings) and few granules can be skipped. In that case the dynamic filter degrades query latency rather than improving it.
When this setting is 0, dynamic filtering is restricted to columns whose values have a fixed maximum size in memory (numbers, Date, DateTime, FixedString, Enum, Nullable of such types, Tuple of such types). When set to 1, dynamic filtering applies to variable-length types as well.
Possible values:
- 0 — Disabled.
- 1 — Enabled.