mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
19 lines
525 B
SQL
19 lines
525 B
SQL
DROP TABLE IF EXISTS skip_table;
|
|
|
|
CREATE TABLE skip_table
|
|
(
|
|
k UInt64,
|
|
v UInt64,
|
|
INDEX v_set v TYPE set(100) GRANULARITY 2, -- set index is declared before minmax intentionally
|
|
INDEX v_mm v TYPE minmax GRANULARITY 2
|
|
)
|
|
ENGINE = MergeTree
|
|
PRIMARY KEY k
|
|
SETTINGS index_granularity = 8192;
|
|
|
|
INSERT INTO skip_table SELECT number, intDiv(number, 4096) FROM numbers(100000);
|
|
|
|
SELECT trim(explain) FROM ( EXPLAIN indexes = 1 SELECT * FROM skip_table WHERE v = 125) WHERE explain like '%Name%';
|
|
|
|
DROP TABLE skip_table;
|