2021-03-01 10:04:34 +00:00
|
|
|
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);
|
|
|
|
|
2021-03-08 03:58:18 +00:00
|
|
|
SET optimize_fuse_sum_count_avg = 1;
|
2021-03-01 10:04:34 +00:00
|
|
|
SELECT sum(a), sum(b), count(b) from fuse_tbl;
|
|
|
|
EXPLAIN SYNTAX SELECT sum(a), sum(b), count(b) from fuse_tbl;
|
2021-03-08 03:58:18 +00:00
|
|
|
SELECT '---------NOT trigger fuse--------';
|
|
|
|
SELECT sum(a), avg(b) from fuse_tbl;
|
|
|
|
EXPLAIN SYNTAX SELECT sum(a), avg(b) from fuse_tbl;
|
2021-03-01 10:04:34 +00:00
|
|
|
DROP TABLE fuse_tbl;
|