use_statistics
/// preferred over ‘allow_statistics_optimize’ because of consistency with ‘use_primary_key’ and ‘use_skip_indexes’ Allows using statistics to optimize queriesuse_statistics_for_min_max_aggregation
Answermin, max and count aggregations from per-part column statistics instead of reading data.
When enabled, a query of the form SELECT min(column), max(column), count() FROM table without GROUP BY and filters
is answered from column statistics (e.g. MinMax statistics, see the auto_statistics_types MergeTree setting)
for the data parts that have them materialized, and only the remaining parts are read.
count() is also answered together with the aggregations of use_statistics_for_sum_avg_aggregation.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
use_statistics_for_part_pruning
Use statistics to filter out parts during query execution. When enabled, pruning in SELECT queries will use column statistics (e.g. MinMax statistics) to eliminate parts that cannot contain matching data before reading any data. Possible values:- 0 — Disabled.
- 1 — Enabled.
use_statistics_for_sum_avg_aggregation
Answersum, avg and sumCount aggregations over integer and Decimal columns that are not Nullable or
LowCardinality, without GROUP BY and filters, from per-part column statistics (the basic statistics type, see the
auto_statistics_types MergeTree setting) for the data parts that have them materialized, and read only the remaining
parts. count(column) of a column that is not Nullable or LowCardinality is answered there from the number of rows.
The result is exactly the same as when reading the data.
Possible values:
- 0 — Disabled.
- 1 — Enabled.