2019-07-23 06:18:44 +00:00
|
|
|
DROP TABLE IF EXISTS test_00974;
|
|
|
|
|
|
|
|
CREATE TABLE test_00974
|
|
|
|
(
|
|
|
|
date Date,
|
|
|
|
x Int32,
|
|
|
|
ver UInt64
|
|
|
|
)
|
2019-07-25 01:07:06 +00:00
|
|
|
ENGINE = ReplacingMergeTree(date, x, 1);
|
2019-07-23 06:18:44 +00:00
|
|
|
|
|
|
|
INSERT INTO test_00974 VALUES ('2019-07-23', 1, 1), ('2019-07-23', 1, 2);
|
|
|
|
INSERT INTO test_00974 VALUES ('2019-07-23', 2, 1), ('2019-07-23', 2, 2);
|
|
|
|
|
2019-07-25 19:08:40 +00:00
|
|
|
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS enable_optimize_predicate_expression_to_final_subquery = 0;
|
|
|
|
SELECT COUNT() FROM (SELECT * FROM test_00974 FINAL) where x = 1 SETTINGS enable_optimize_predicate_expression_to_final_subquery = 1, max_rows_to_read = 2;
|
2019-07-23 06:18:44 +00:00
|
|
|
|
|
|
|
DROP TABLE test_00974;
|