mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-06 06:22:39 +00:00
61e50a346a
Should fix flakiness like [1]. [1]: https://s3.amazonaws.com/clickhouse-test-reports/66098/93afc8e6133365007488c4d8340f434f6e8a876f/stateless_tests__aarch64_.html Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
18 lines
702 B
SQL
18 lines
702 B
SQL
-- Tags: no-parallel
|
|
-- no-parallel: it checks the number of threads, which can be lowered in presence of other queries
|
|
-- 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, max_block_size=100000;
|
|
system flush logs;
|
|
|
|
select peak_threads_usage>=16 from system.query_log where
|
|
event_date >= yesterday() and
|
|
current_database = currentDatabase() and
|
|
type = 'QueryFinish' and
|
|
startsWith(query, 'insert');
|