select a, b from test_all;
优点
空间换时间:查询速度快
CREATE MATERIALIZED VIEW test_mv ON CLUSTER ENGINE=ReplicatedReplacingMergeTree partition by toYYYYMM(b) ORDER BY (b)
AS
select a, b from test_all where a != 1;
select a, b from test_mv 会看到没有数据
optimize table test_mv 也没有用