mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
9225256dea
- cover optimize_trivial_insert_select=0/1 - cover max_insert_threads - convert parallel_view_processing into jinja2 Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
197 lines
6.4 KiB
Plaintext
197 lines
6.4 KiB
Plaintext
-- { echoOn }
|
|
|
|
|
|
|
|
select 'optimize_trivial_insert_select=0', 'max_insert_threads=0';
|
|
optimize_trivial_insert_select=0 max_insert_threads=0
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=0,
|
|
optimize_trivial_insert_select=0,
|
|
max_insert_threads=0; -- { 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'] = '0' and
|
|
Settings['optimize_trivial_insert_select'] = '0' and
|
|
Settings['max_insert_threads'] = '0';
|
|
2
|
|
select count() from testX;
|
|
10
|
|
select count() from testXA;
|
|
10
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
10
|
|
select 'optimize_trivial_insert_select=0', 'max_insert_threads=16';
|
|
optimize_trivial_insert_select=0 max_insert_threads=16
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=0,
|
|
optimize_trivial_insert_select=0,
|
|
max_insert_threads=16; -- { 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'] = '0' and
|
|
Settings['optimize_trivial_insert_select'] = '0' and
|
|
Settings['max_insert_threads'] = '16';
|
|
2
|
|
select count() from testX;
|
|
20
|
|
select count() from testXA;
|
|
20
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
20
|
|
select 'optimize_trivial_insert_select=1', 'max_insert_threads=0';
|
|
optimize_trivial_insert_select=1 max_insert_threads=0
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=0,
|
|
optimize_trivial_insert_select=1,
|
|
max_insert_threads=0; -- { 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'] = '0' and
|
|
Settings['optimize_trivial_insert_select'] = '1' and
|
|
Settings['max_insert_threads'] = '0';
|
|
2
|
|
select count() from testX;
|
|
30
|
|
select count() from testXA;
|
|
30
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
30
|
|
select 'optimize_trivial_insert_select=1', 'max_insert_threads=16';
|
|
optimize_trivial_insert_select=1 max_insert_threads=16
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=0,
|
|
optimize_trivial_insert_select=1,
|
|
max_insert_threads=16; -- { 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'] = '0' and
|
|
Settings['optimize_trivial_insert_select'] = '1' and
|
|
Settings['max_insert_threads'] = '16';
|
|
2
|
|
select count() from testX;
|
|
40
|
|
select count() from testXA;
|
|
40
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
40
|
|
select 'optimize_trivial_insert_select=0', 'max_insert_threads=0';
|
|
optimize_trivial_insert_select=0 max_insert_threads=0
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=1,
|
|
optimize_trivial_insert_select=0,
|
|
max_insert_threads=0; -- { 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'] = '1' and
|
|
Settings['optimize_trivial_insert_select'] = '0' and
|
|
Settings['max_insert_threads'] = '0';
|
|
5
|
|
select count() from testX;
|
|
50
|
|
select count() from testXA;
|
|
50
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
50
|
|
select 'optimize_trivial_insert_select=0', 'max_insert_threads=16';
|
|
optimize_trivial_insert_select=0 max_insert_threads=16
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=1,
|
|
optimize_trivial_insert_select=0,
|
|
max_insert_threads=16; -- { 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'] = '1' and
|
|
Settings['optimize_trivial_insert_select'] = '0' and
|
|
Settings['max_insert_threads'] = '16';
|
|
5
|
|
select count() from testX;
|
|
60
|
|
select count() from testXA;
|
|
60
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
60
|
|
select 'optimize_trivial_insert_select=1', 'max_insert_threads=0';
|
|
optimize_trivial_insert_select=1 max_insert_threads=0
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=1,
|
|
optimize_trivial_insert_select=1,
|
|
max_insert_threads=0; -- { 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'] = '1' and
|
|
Settings['optimize_trivial_insert_select'] = '1' and
|
|
Settings['max_insert_threads'] = '0';
|
|
5
|
|
select count() from testX;
|
|
70
|
|
select count() from testXA;
|
|
70
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
70
|
|
select 'optimize_trivial_insert_select=1', 'max_insert_threads=16';
|
|
optimize_trivial_insert_select=1 max_insert_threads=16
|
|
insert into testX select number from numbers(10) settings
|
|
log_queries=1,
|
|
parallel_view_processing=1,
|
|
optimize_trivial_insert_select=1,
|
|
max_insert_threads=16; -- { 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'] = '1' and
|
|
Settings['optimize_trivial_insert_select'] = '1' and
|
|
Settings['max_insert_threads'] = '16';
|
|
5
|
|
select count() from testX;
|
|
80
|
|
select count() from testXA;
|
|
80
|
|
select count() from testXB;
|
|
0
|
|
select count() from testXC;
|
|
80
|