ClickHouse/tests/queries/0_stateless/02996_index_compaction_counterexample.sql
2024-02-21 22:51:26 +01:00

9 lines
315 B
SQL

DROP TABLE IF EXISTS b;
create table b (x Int64, y String) engine MergeTree order by (x, y) settings index_granularity=2;
insert into b values (0, 'a'), (1, 'b'), (1, 'c');
select count() from b where x = 1 and y = 'b';
detach table b;
attach table b;
select count() from b where x = 1 and y = 'b';
DROP TABLE b;