2020-03-30 12:58:00 +00:00
|
|
|
DROP TABLE IF EXISTS src_00726;
|
|
|
|
DROP TABLE IF EXISTS mv1_00726;
|
|
|
|
DROP TABLE IF EXISTS mv2_00726;
|
2018-10-03 02:06:04 +00:00
|
|
|
|
2020-03-30 12:58:00 +00:00
|
|
|
CREATE TABLE src_00726 (x UInt8) ENGINE = Null;
|
|
|
|
CREATE MATERIALIZED VIEW mv1_00726 ENGINE = Memory AS SELECT x FROM src_00726 WHERE x % 2 = 0;
|
|
|
|
CREATE MATERIALIZED VIEW mv2_00726 ENGINE = Memory AS SELECT x FROM src_00726 WHERE x % 2 = 1;
|
2018-10-03 02:06:04 +00:00
|
|
|
|
|
|
|
SET parallel_view_processing = 1;
|
2020-03-30 12:58:00 +00:00
|
|
|
INSERT INTO src_00726 VALUES (1), (2);
|
2018-10-03 02:06:04 +00:00
|
|
|
|
|
|
|
SET parallel_view_processing = 0;
|
2020-03-30 12:58:00 +00:00
|
|
|
INSERT INTO src_00726 VALUES (3), (4);
|
2018-10-03 02:06:04 +00:00
|
|
|
|
2020-03-30 12:58:00 +00:00
|
|
|
SELECT * FROM mv1_00726 ORDER BY x;
|
|
|
|
SELECT * FROM mv2_00726 ORDER BY x;
|
2018-10-03 02:06:04 +00:00
|
|
|
|
2020-03-30 12:58:00 +00:00
|
|
|
DROP TABLE mv1_00726;
|
|
|
|
DROP TABLE mv2_00726;
|
|
|
|
DROP TABLE src_00726;
|