2021-06-22 11:50:09 +00:00
|
|
|
DROP TABLE IF EXISTS secure1;
|
|
|
|
DROP TABLE IF EXISTS secure2;
|
|
|
|
DROP TABLE IF EXISTS secure3;
|
2018-03-29 01:41:06 +00:00
|
|
|
|
2021-06-22 11:50:09 +00:00
|
|
|
CREATE TABLE secure1 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = MergeTree(date, (a, date), 8192);
|
|
|
|
CREATE TABLE secure2 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = Distributed(test_shard_localhost_secure, currentDatabase(), 'secure1');
|
|
|
|
CREATE TABLE secure3 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = Distributed(test_shard_localhost_secure, currentDatabase(), 'secure2');
|
2018-03-29 01:41:06 +00:00
|
|
|
|
2021-06-22 11:50:09 +00:00
|
|
|
INSERT INTO secure1 VALUES (1, 2, 3, 4, 5);
|
|
|
|
INSERT INTO secure1 VALUES (11,12,13,14,15);
|
|
|
|
INSERT INTO secure2 VALUES (21,22,23,24,25);
|
|
|
|
INSERT INTO secure3 VALUES (31,32,33,34,35);
|
2018-03-29 01:41:06 +00:00
|
|
|
|
2021-06-22 11:50:09 +00:00
|
|
|
SYSTEM FLUSH DISTRIBUTED secure2;
|
|
|
|
SYSTEM FLUSH DISTRIBUTED secure3;
|
2018-03-29 01:41:06 +00:00
|
|
|
|
2021-06-22 11:50:09 +00:00
|
|
|
SELECT * FROM secure1 ORDER BY a;
|
|
|
|
SELECT * FROM secure2 ORDER BY a;
|
|
|
|
SELECT * FROM secure3 ORDER BY a;
|
2018-03-29 01:41:06 +00:00
|
|
|
|
2021-06-22 11:50:09 +00:00
|
|
|
DROP TABLE secure1;
|
|
|
|
DROP TABLE secure2;
|
|
|
|
DROP TABLE secure3;
|