These settings are available in system.settings and are autogenerated from source.
read_in_order_two_level_merge_threshold
Minimal number of parts to read to run preliminary merge step during multithread reading in order of primary key.
read_in_order_use_buffering
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.7 | 1 | Use buffering before merging while reading in order of primary key |
Use buffering before merging while reading in order of primary key. It increases the parallelism of query executio
read_in_order_use_virtual_row
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 1 | Enable the virtual row optimization by default. When reading in order of the primary key over many parts, it lets `MergingSortedTransform` reprioritize sources using primary key values from the sparse index, so parts that are not relevant for the query are not read, plus a bounded read-ahead window of at most `max_threads` parts that keeps reads parallel. This significantly reduces peak memory consumption (see https://github.com/ClickHouse/ClickHouse/issues/52624). |
| 24.11 | 0 | Use virtual row while reading in order of primary key or its monotonic function fashion. It is useful when searching over multiple parts as only relevant ones are touched. |
Use virtual row while reading in order of primary key or its monotonic function fashion. It is useful when searching over multiple parts as only the parts that can actually contribute to the result are read, plus a bounded read-ahead window of at most max_threads parts that keeps reads parallel.
read_in_order_use_virtual_row_per_block
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.4 | 0 | Emit virtual row after each block during read-in-order to allow more frequent source reprioritization in MergingSortedTransform. |
When enabled together with read_in_order_use_virtual_row, emit a virtual row after each block read (not only at the beginning of each part).
This allows MergingSortedTransform to reprioritize sources more frequently, which is useful when downstream filters discard many rows and data is distributed unevenly across parts.
Note that it disables read_in_order_use_buffering optimization and preliminary merge (read_in_order_two_level_merge_threshold) for reading.