mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
19 lines
808 B
SQL
19 lines
808 B
SQL
DROP TABLE IF EXISTS sample_00579_1;
|
|
DROP TABLE IF EXISTS sample_00579_2;
|
|
DROP TABLE IF EXISTS sample_merge_00579;
|
|
|
|
CREATE TABLE sample_00579_1 (x UInt64, d Date DEFAULT today()) ENGINE = MergeTree(d, intHash64(x), intHash64(x), 10);
|
|
CREATE TABLE sample_00579_2 (x UInt64, d Date DEFAULT today()) ENGINE = MergeTree(d, intHash64(x), intHash64(x), 10);
|
|
|
|
INSERT INTO sample_00579_1 (x) SELECT number AS x FROM system.numbers LIMIT 1000;
|
|
INSERT INTO sample_00579_2 (x) SELECT number AS x FROM system.numbers LIMIT 2000;
|
|
|
|
CREATE TABLE sample_merge_00579 AS sample_00579_1 ENGINE = Merge(currentDatabase(), '^sample_00579_\\d$');
|
|
|
|
SET max_threads = 1;
|
|
SELECT _sample_factor FROM merge(currentDatabase(), '^sample_00579_\\d$');
|
|
|
|
DROP TABLE sample_00579_1;
|
|
DROP TABLE sample_00579_2;
|
|
DROP TABLE sample_merge_00579;
|