mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
118bea2be6
* Enable predicate push-down optimization by default. * Forbid push-downs for some JOIN cases. * Fix existing tests * Forbid optimization if a select query has ARRAY JOIN on any side.
23 lines
673 B
SQL
23 lines
673 B
SQL
SET compile_expressions = 1;
|
|
SET min_count_to_compile_expression = 1;
|
|
SET optimize_move_to_prewhere = 0;
|
|
|
|
DROP TABLE IF EXISTS dt;
|
|
DROP TABLE IF EXISTS testx;
|
|
|
|
CREATE TABLE dt(tkey Int32) ENGINE = MergeTree order by tuple();
|
|
INSERT INTO dt VALUES (300000);
|
|
CREATE TABLE testx(t Int32, a UInt8) ENGINE = MergeTree ORDER BY tuple();
|
|
INSERT INTO testx VALUES (100000, 0);
|
|
|
|
SELECT COUNT(*) FROM testx WHERE NOT a AND t < (SELECT tkey FROM dt);
|
|
|
|
DROP TABLE dt;
|
|
CREATE TABLE dt(tkey Int32) ENGINE = MergeTree order by tuple();
|
|
INSERT INTO dt VALUES (0);
|
|
|
|
SELECT COUNT(*) FROM testx WHERE NOT a AND t < (SELECT tkey FROM dt);
|
|
|
|
DROP TABLE IF EXISTS dt;
|
|
DROP TABLE IF EXISTS testx;
|