Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

materialize_statistics_on_insert_* session settings

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

materialize_statistics_on_insert

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.81Materialize column statistics on INSERT by default for tables below `materialize_statistics_on_insert_max_table_size`, so cost-based join reordering has good estimates on freshly-loaded dimension tables.
26.40Disable building statistics on INSERT by default, rely on merges instead
24.61Added new setting to allow to disable materialization of statistics on insert

If statistics are build and materialized for newly inserted parts. Even if disabled, statistics are still be build and stored during merges or by explicit MATERIALIZE STATISTICS. Only tables whose current size plus the size of the block being written, does not exceed materialize_statistics_on_insert_max_table_size are affected.

materialize_statistics_on_insert_max_table_size

Type
UInt64
Default
26843545600
Version history
VersionDefault valueComment
26.826843545600New setting.

Only build and store column statistics for newly inserted parts (see materialize_statistics_on_insert) for tables whose current size plus the block being written, does not exceed this value. 0 means no size limit.

Navigation