mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
15 lines
494 B
SQL
15 lines
494 B
SQL
DROP TABLE IF EXISTS fuse_tbl;
|
|
CREATE TABLE fuse_tbl(a Int8, b Int8) Engine = Log;
|
|
INSERT INTO fuse_tbl SELECT number, number + 1 FROM numbers(1, 20);
|
|
|
|
SET optimize_syntax_fuse_functions = 1;
|
|
SET optimize_fuse_sum_count_avg = 1;
|
|
|
|
SELECT sum(a), sum(b), count(b) from fuse_tbl;
|
|
EXPLAIN SYNTAX SELECT sum(a), sum(b), count(b) from fuse_tbl;
|
|
SELECT '---------NOT trigger fuse--------';
|
|
SELECT sum(a), avg(b) from fuse_tbl;
|
|
EXPLAIN SYNTAX SELECT sum(a), avg(b) from fuse_tbl;
|
|
|
|
DROP TABLE fuse_tbl;
|