ClickHouse/dbms/tests/queries/0_stateless/00750_merge_tree_merge_with_o_direct.sql

12 lines
512 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS sample_merge_tree;
2018-10-31 11:45:53 +00:00
CREATE TABLE sample_merge_tree (dt DateTime, x UInt64) ENGINE = MergeTree PARTITION BY toYYYYMMDD(dt) ORDER BY x SETTINGS min_merge_bytes_to_use_direct_io=1, index_granularity = 8192;
2018-10-31 11:45:53 +00:00
INSERT INTO sample_merge_tree VALUES (toDateTime('2018-10-31 05:05:00'), 0), (toDateTime('2018-10-31 06:06:00'), 10), (toDateTime('2018-10-28 10:00:00'), 20);
2018-10-31 11:45:53 +00:00
OPTIMIZE TABLE sample_merge_tree FINAL;
2018-10-31 11:45:53 +00:00
SELECT * FROM sample_merge_tree ORDER BY x;
2018-10-31 11:45:53 +00:00
DROP TABLE IF EXISTS sample_merge_tree;