Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

read_in_* session settings

These settings are available in system.settings and are autogenerated from source.

read_in_order_two_level_merge_threshold

Type
UInt64
Default
100

Minimal number of parts to read to run preliminary merge step during multithread reading in order of primary key.

read_in_order_use_buffering

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.71Use 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.81Enable 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.110Use 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.40Emit 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.

Navigation