ClickHouse/tests/queries/0_stateless/02350_views_max_insert_threads.sql
Azat Khuzhin 4ae7db8369 Fix max_insert_threads while pushing to views
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-03 15:14:05 +03:00

16 lines
562 B
SQL

-- https://github.com/ClickHouse/ClickHouse/issues/37900
drop table if exists t;
drop table if exists t_mv;
create table t (a UInt64) Engine = Null;
create materialized view t_mv Engine = Null AS select now() as ts, max(a) from t group by ts;
insert into t select * from numbers_mt(10e6) settings max_threads = 16, max_insert_threads=16;
system flush logs;
select arrayUniq(thread_ids)>=16 from system.query_log where
event_date >= yesterday() and
current_database = currentDatabase() and
type = 'QueryFinish' and
startsWith(query, 'insert');