mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 06:32:08 +00:00
24682556a4
* fix storage merge on view cannot use index * minor fix code + tests * fix view stage * fix stage * fix style * fix tests
10 lines
504 B
SQL
10 lines
504 B
SQL
|
|
CREATE TABLE m0 (id UInt64) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1;
|
|
INSERT INTO m0 SELECT number FROM numbers(10);
|
|
CREATE TABLE m1 (id UInt64, s String) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1;
|
|
INSERT INTO m1 SELECT number, 'boo' FROM numbers(10);
|
|
CREATE VIEW m1v AS SELECT id FROM m1;
|
|
|
|
CREATE TABLE m2 (id UInt64) ENGINE=Merge(currentDatabase(),'m0|m1v');
|
|
|
|
SELECT * FROM m2 WHERE id > 1 AND id < 5 ORDER BY id SETTINGS force_primary_key=1, max_bytes_to_read=64; |