v.19.3Experimental Features
Added Minmax and Set Data Skipping Indices for Mergetree Table Engines Family
Addedminmaxandsetdata skipping indices for MergeTree table engines family. #4143 (Nikita Vasilev)
Why it matters
The feature introduces two new types of data skipping indices,minmax and set, which improve query performance by allowing ClickHouse to skip unnecessary data ranges during query execution. This reduces IO and speeds up queries on large datasets by filtering out irrelevant data blocks more efficiently.How to use it
To use the new data skipping indices, define an index of typeminmax or set on a MergeTree table using the CREATE TABLE or ALTER TABLE statement with the INDEX clause. For example:CREATE TABLE example (
id UInt64,
value String
) ENGINE = MergeTree()
ORDER BY id
SETTINGS index_granularity = 8192;
ALTER TABLE example
ADD INDEX idx_value_set value TYPE set(100) GRANULARITY 1;Then, queries filtering on the indexed columns will benefit from the data skipping index.