mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +00:00
17 lines
649 B
SQL
17 lines
649 B
SQL
-- Tags: distributed
|
|
|
|
SET insert_distributed_sync = 1;
|
|
|
|
DROP TABLE IF EXISTS low_cardinality;
|
|
DROP TABLE IF EXISTS low_cardinality_all;
|
|
|
|
set allow_deprecated_syntax_for_merge_tree=1;
|
|
CREATE TABLE low_cardinality (d Date, x UInt32, s LowCardinality(String)) ENGINE = MergeTree(d, x, 8192);
|
|
CREATE TABLE low_cardinality_all (d Date, x UInt32, s LowCardinality(String)) ENGINE = Distributed(test_shard_localhost, currentDatabase(), low_cardinality, sipHash64(s));
|
|
|
|
INSERT INTO low_cardinality_all (d,x,s) VALUES ('2018-11-12',1,'123');
|
|
SELECT s FROM low_cardinality_all;
|
|
|
|
DROP TABLE IF EXISTS low_cardinality;
|
|
DROP TABLE IF EXISTS low_cardinality_all;
|