mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
7427adb600
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
51 lines
1.8 KiB
Django/Jinja
51 lines
1.8 KiB
Django/Jinja
-- Tags: no-s3-storage
|
|
-- no-s3-storage: s3 has 20 more threads
|
|
|
|
-- avoid settings randomization by clickhouse-test
|
|
set max_threads = 0;
|
|
|
|
drop table if exists testX;
|
|
drop table if exists testXA;
|
|
drop table if exists testXB;
|
|
drop table if exists testXC;
|
|
|
|
create table testX (A Int64) engine=MergeTree order by tuple();
|
|
|
|
create materialized view testXA engine=MergeTree order by tuple() as select sleep(0.1) from testX;
|
|
create materialized view testXB engine=MergeTree order by tuple() as select sleep(0.2), throwIf(A=1) from testX;
|
|
create materialized view testXC engine=MergeTree order by tuple() as select sleep(0.1) from testX;
|
|
|
|
-- { echoOn }
|
|
{% for parallel_view_processing in [0, 1] %}
|
|
{% for optimize_trivial_insert_select in [0, 1] %}
|
|
{% for max_insert_threads in [0, 16] %}
|
|
select 'optimize_trivial_insert_select={{ optimize_trivial_insert_select }}', 'max_insert_threads={{ max_insert_threads }}';
|
|
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing={{ parallel_view_processing }},
|
|
optimize_trivial_insert_select={{ optimize_trivial_insert_select }},
|
|
max_insert_threads={{ max_insert_threads }}; -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }
|
|
system flush logs;
|
|
select arrayUniq(thread_ids) from system.query_log where
|
|
current_database = currentDatabase() and
|
|
type != 'QueryStart' and
|
|
query like '%insert into testX %' and
|
|
Settings['parallel_view_processing'] = '{{ parallel_view_processing }}' and
|
|
Settings['optimize_trivial_insert_select'] = '{{ optimize_trivial_insert_select }}' and
|
|
Settings['max_insert_threads'] = '{{ max_insert_threads }}';
|
|
|
|
select count() from testX;
|
|
select count() from testXA;
|
|
select count() from testXB;
|
|
select count() from testXC;
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
-- { echoOff }
|
|
|
|
drop table testX;
|
|
drop view testXA;
|
|
drop view testXB;
|
|
drop view testXC;
|