> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# use_* session settings

> ClickHouse session settings in the use_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

export const ExperimentalBadge = () => {
  return <div className="experimentalBadge">
            <div className="experimentalIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path strokeWidth="1.25" d="M5.5 2H10.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M9.50015 2V6.19625L13.4283 12.7425C13.4738 12.8183 13.4985 12.9049 13.4996 12.9934C13.5008 13.0818 13.4785 13.169 13.435 13.246C13.3914 13.323 13.3283 13.3871 13.2519 13.4317C13.1755 13.4764 13.0886 13.4999 13.0002 13.5H3.00015C2.91164 13.5 2.8247 13.4766 2.74822 13.432C2.67174 13.3874 2.60847 13.3233 2.56487 13.2463C2.52126 13.1693 2.49889 13.082 2.50004 12.9935C2.50119 12.905 2.52582 12.8184 2.5714 12.7425L6.50015 6.19625V2" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M4.47656 9.56754C5.30344 9.41254 6.47656 9.47942 7.99969 10.25C10.0153 11.2707 11.4216 11.0569 12.2184 10.7282" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            Experimental feature. <u><a href="/docs/docs/beta-and-experimental-features#experimental-features">Learn more.</a></u>
        </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="use_async_executor_for_materialized_views">
  use\_async\_executor\_for\_materialized\_views
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.12"},{"label": "0"},{"label": "New setting."}]}]} />

Use async and potentially multithreaded execution of materialized view query, can speedup views processing during INSERT, but also consume more memory.

<h2 id="use_cache_for_count_from_files">
  use\_cache\_for\_count\_from\_files
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Enables caching of rows number during count from files in table functions `file`/`s3`/`url`/`hdfs`/`azureBlobStorage`.

Enabled by default.

<h2 id="use_client_time_zone">
  use\_client\_time\_zone
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Use client timezone for interpreting DateTime string values, instead of adopting server timezone.

<h2 id="use_compact_format_in_distributed_parts_names">
  use\_compact\_format\_in\_distributed\_parts\_names
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "21.1"},{"label": "1"},{"label": "Use compact format for async INSERT into Distributed tables by default"}]}]} />

Uses compact format for storing blocks for background (`distributed_foreground_insert`) INSERT into tables with `Distributed` engine.

Possible values:

* 0 — Uses `user[:password]@host:port#default_database` directory format.
* 1 — Uses `[shard{shard_index}[_replica{replica_index}]]` directory format.

<Note>
  - with `use_compact_format_in_distributed_parts_names=0` changes from cluster definition will not be applied for background INSERT.
  - with `use_compact_format_in_distributed_parts_names=1` changing the order of the nodes in the cluster definition, will change the `shard_index`/`replica_index` so be aware.
</Note>

<h2 id="use_concurrency_control">
  use\_concurrency\_control
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.12"},{"label": "1"},{"label": "Enable concurrency control by default"}]}]} />

Respect the server's concurrency control (see the `concurrent_threads_soft_limit_num` and `concurrent_threads_soft_limit_ratio_to_cores` global server settings). If disabled, it allows using a larger number of threads even if the server is overloaded (not recommended for normal usage, and needed mostly for tests).

<h2 id="use_constant_folding_in_index_analysis">
  use\_constant\_folding\_in\_index\_analysis
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "New setting to fold partition-level constants into the filter predicate per part during MergeTree index analysis, improving pruning for filters whose branches depend on partition values."}]}]} />

Substitute partition-level constants into the filter predicate when analyzing per-part primary key and skip indexes.

When the partition key appears in the filter together with primary-key or skip-index columns, this lets index analysis fold the partition value separately within each part. It is most useful for disjunctive filters whose branches target different partitions. For example, with `PARTITION BY a` and `ORDER BY b`:

```sql theme={null}
SELECT * FROM t WHERE (a = 1 AND b >= 1) OR (a = 2 AND b > 10) OR (a = 3 AND b > 10)
```

For the part in partition `a = 1` the condition folds to `b >= 1`, while for partitions `a = 2` and `a = 3` it folds to `b > 10`, so each part is analyzed with the predicate that actually applies to it.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="use_hash_table_stats_for_join_reordering">
  use\_hash\_table\_stats\_for\_join\_reordering
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.1"},{"label": "1"},{"label": "New setting. Previously mirrored 'collect_hash_table_stats_during_joins' setting."}]}]} />

Enable using collected hash table statistics for cardinality estimation during join reordering

<h2 id="use_hedged_requests">
  use\_hedged\_requests
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "21.9"},{"label": "1"},{"label": "Enable Hedged Requests feature by default"}]}]} />

Enables hedged requests logic for remote queries. It allows to establish many connections with different replicas for query.
New connection is enabled in case existent connection(s) with replica(s) were not established within `hedged_connection_timeout`
or no data was received within `receive_data_timeout`. Query uses the first connection which send non empty progress packet (or data packet, if `allow_changing_replica_until_first_data_packet`);
other connections are cancelled. Queries with `max_parallel_replicas > 1` are supported.

Enabled by default.

Cloud default value: `0`.

<h2 id="use_hive_partitioning">
  use\_hive\_partitioning
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "Enabled the setting by default."}]}, {"id": "row-2","items": [{"label": "24.8"},{"label": "0"},{"label": "Allows to use hive partitioning for File, URL, S3, AzureBlobStorage and HDFS engines."}]}]} />

When enabled, ClickHouse will detect Hive-style partitioning in path (`/name=value/`) in file-like table engines [File](/docs/reference/functions/table-functions/file#hive-style-partitioning)/[S3](/docs/reference/functions/table-functions/s3#hive-style-partitioning)/[URL](/docs/reference/functions/table-functions/url#hive-style-partitioning)/[HDFS](/docs/reference/functions/table-functions/hdfs#hive-style-partitioning)/[AzureBlobStorage](/docs/reference/functions/table-functions/azureBlobStorage#hive-style-partitioning) and will allow to use partition columns as virtual columns in the query. These virtual columns will have the same names as in the partitioned path, but starting with `_`.

<h2 id="use_join_disjunctions_push_down">
  use\_join\_disjunctions\_push\_down
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.1"},{"label": "1"},{"label": "Enabled this optimization."}]}, {"id": "row-2","items": [{"label": "25.10"},{"label": "0"},{"label": "New setting."}]}]} />

Enable pushing OR-connected parts of JOIN conditions down to the corresponding input sides ("partial pushdown").
This allows storage engines to filter earlier, which can reduce data read.
The optimization is semantics-preserving and is applied only when each top-level OR branch contributes at least one deterministic
predicate for the target side.

<h2 id="use_legacy_to_time">
  use\_legacy\_to\_time
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "Use the new `toTime` function (converting values to the `Time` data type) by default instead of the legacy `toTime` (which is still available as `toTimeWithFixedDate`)."}]}, {"id": "row-2","items": [{"label": "25.6"},{"label": "1"},{"label": "New setting. Allows for user to use the old function logic for toTime, which works as toTimeWithFixedDate."}]}]} />

When enabled, allows to use legacy toTime function, which converts a date with time to a certain fixed date, while preserving the time.
Otherwise, uses a new toTime function, that converts different type of data into the Time type.
The old legacy function is also unconditionally accessible as toTimeWithFixedDate.

<h2 id="use_lightweight_primary_key_index_analysis">
  use\_lightweight\_primary\_key\_index\_analysis
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "1"},{"label": "New setting to optimize primary key index analysis for tables with long primary keys"}]}]} />

Optimize primary key index analysis for `MergeTree` tables with long primary keys.

When enabled, the run time of index analysis mainly depends on the complexity of the query's filter (the key columns it actually uses), not on the length of the primary key — so extending the sorting key has negligible extra overhead on index analysis for queries that filter on only a few of its columns.

Possible values:

* 0 — Disabled. All primary key columns are processed during index analysis.
* 1 — Enabled.

<h2 id="use_parquet_metadata_cache">
  use\_parquet\_metadata\_cache
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "1"},{"label": "Enables cache of parquet file metadata."}]}]} />

If turned on, parquet format may utilize the parquet metadata cache.

Possible values:

* 0 - Disabled
* 1 - Enabled

<h2 id="use_primary_key">
  use\_primary\_key
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.1"},{"label": "1"},{"label": "New setting controlling whether MergeTree uses the primary key for granule-level pruning."}]}]} />

Use the primary key to prune granules during query execution for MergeTree tables.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="use_reader_executor">
  use\_reader\_executor
</h2>

<ExperimentalBadge />

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "0"},{"label": "New experimental setting to route reads through the new pipeline ReaderExecutor instead of the legacy matryoshka of read buffers."}]}]} />

Experimental. Route reads through the new pipeline `ReaderExecutor` instead of the legacy matryoshka of read buffers. Falls back to the legacy path for configurations the executor does not yet support.

<h2 id="use_roaring_bitmap_iceberg_positional_deletes">
  use\_roaring\_bitmap\_iceberg\_positional\_deletes
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "0"},{"label": "New setting"}]}]} />

Use roaring bitmap for iceberg positional deletes.

<h2 id="use_streaming_marks_compression">
  use\_streaming\_marks\_compression
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "New setting to compress marks into in-memory representation one block at a time (streaming) instead of materializing the full plain marks array, reducing peak memory during marks loading for compact parts with many substreams."}]}]} />

When loading marks for MergeTree parts, compress them into the in-memory representation one block at a time (streaming) instead of materializing the full plain marks array first. This significantly reduces peak memory usage during marks loading for compact parts with many substreams (e.g. tables with JSON columns and write\_marks\_for\_substreams\_in\_compact\_parts enabled).

<h2 id="use_strict_insert_block_limits">
  use\_strict\_insert\_block\_limits
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "0"},{"label": "New setting to use strict min and max insert bounds on inserts. When min < max, max limits take precedence."}]}]} />

When enabled, strictly enforces both minimum and maximum insert block size limits.

A block is emitted when:

* Min thresholds (AND): Both min\_insert\_block\_size\_rows AND min\_insert\_block\_size\_bytes are reached.
* Max thresholds (OR): Either max\_insert\_block\_size\_rows OR max\_insert\_block\_size\_bytes is reached.

When disabled, a block is emitted when:

* Min thresholds (OR):  min\_insert\_block\_size\_rows OR min\_insert\_block\_size\_bytes is reached.

**Note**: If max settings are smaller than min settings, the max limits take precedence and blocks will be emitted before min thresholds are reached.

**Note**: This setting is automatically disabled for async inserts, because async inserts attach per-entry deduplication tokens that are incompatible with block splitting that is needed for enforcement of strict limits.

Disabled by default.

<h2 id="use_structure_from_insertion_table_in_table_functions">
  use\_structure\_from\_insertion\_table\_in\_table\_functions
</h2>

<SettingsInfoBlock type="UInt64" default_value="2" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.11"},{"label": "2"},{"label": "Improve using structure from insertion table in table functions"}]}]} />

Use structure from insertion table instead of schema inference from data. Possible values: 0 - disabled, 1 - enabled, 2 - auto

<h2 id="use_uncompressed_cache">
  use\_uncompressed\_cache
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Whether to use a cache of uncompressed blocks. Accepts 0 or 1. By default, 0 (disabled).
Using the uncompressed cache (only for tables in the MergeTree family) can significantly reduce latency and increase throughput when working with a large number of short queries. Enable this setting for users who send frequent short requests. Also pay attention to the [uncompressed\_cache\_size](/docs/reference/settings/server-settings/settings#uncompressed_cache_size) configuration parameter (only set in the config file) – the size of uncompressed cache blocks. By default, it is 8 GiB. The uncompressed cache is filled in as needed and the least-used data is automatically deleted.

For queries that read at least a somewhat large volume of data (one million rows or more), the uncompressed cache is disabled automatically to save space for truly small queries. This means that you can keep the 'use\_uncompressed\_cache' setting always set to 1.

<h2 id="use_with_fill_by_sorting_prefix">
  use\_with\_fill\_by\_sorting\_prefix
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.5"},{"label": "1"},{"label": "Columns preceding WITH FILL columns in ORDER BY clause form sorting prefix. Rows with different values in sorting prefix are filled independently"}]}]} />

Columns preceding WITH FILL columns in ORDER BY clause form sorting prefix. Rows with different values in sorting prefix are filled independently
