Update 01119_optimize_trivial_insert_select.sql

This commit is contained in:
Alexander Tokmakov 2022-05-10 11:55:44 +03:00 committed by GitHub
parent f8ac2398b0
commit 702122a502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,11 @@
drop table if exists t;
create table t(n int, a Int64, s String) engine = MergeTree() order by a;
insert into t select 1, sum(number) as c, getSetting('max_threads') from numbers_mt(1000000000);
insert into t select 2, sum(number) as c, getSetting('max_threads') from numbers_mt(1000000000) group by 1;
insert into t select 3, sum(number) as c, getSetting('max_threads') from numbers_mt(100000000) group by 3;
insert into t select 4, sum(number) as c, getSetting('max_threads') as mt from numbers_mt(100000000) group by mt;
insert into t select 1, sum(number) as c, getSetting('max_threads') from numbers_mt(100000000);
insert into t select 2, sum(number) as c, getSetting('max_threads') from numbers_mt(100000000) group by 1;
insert into t select 3, sum(number) as c, getSetting('max_threads') from numbers_mt(10000000) group by 3;
insert into t select 4, sum(number) as c, getSetting('max_threads') as mt from numbers_mt(10000000) group by mt;
select n, a, s != '1', s = toString(getSetting('max_threads')) from t order by n;
drop table t;
drop table t;