2024-03-01 19:29:42 +00:00
|
|
|
DROP TABLE IF EXISTS skip_table;
|
|
|
|
|
|
|
|
CREATE TABLE skip_table
|
|
|
|
(
|
|
|
|
k UInt64,
|
|
|
|
v UInt64,
|
2024-03-01 19:36:05 +00:00
|
|
|
INDEX v_set v TYPE set(100) GRANULARITY 2, -- set index is declared before minmax intentionally
|
2024-03-01 19:29:42 +00:00
|
|
|
INDEX v_mm v TYPE minmax GRANULARITY 2
|
|
|
|
)
|
|
|
|
ENGINE = MergeTree
|
2024-03-04 17:36:06 +00:00
|
|
|
PRIMARY KEY k
|
|
|
|
SETTINGS index_granularity = 8192;
|
2024-03-01 19:29:42 +00:00
|
|
|
|
2024-03-04 17:36:06 +00:00
|
|
|
INSERT INTO skip_table SELECT number, intDiv(number, 4096) FROM numbers(100000);
|
2024-03-01 19:29:42 +00:00
|
|
|
|
2024-03-04 10:09:19 +00:00
|
|
|
SELECT trim(explain) FROM ( EXPLAIN indexes = 1 SELECT * FROM skip_table WHERE v = 125) WHERE explain like '%Name%';
|
2024-03-05 11:55:04 +00:00
|
|
|
|
|
|
|
DROP TABLE skip_table;
|