mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Add a test for max_threads optimization for simple queries
This commit is contained in:
parent
0e12edb895
commit
8c69245283
@ -0,0 +1,21 @@
|
||||
DROP TABLE IF EXISTS data_01283;
|
||||
|
||||
CREATE TABLE data_01283 engine=MergeTree()
|
||||
ORDER BY key
|
||||
PARTITION BY key
|
||||
AS SELECT number key FROM numbers(10);
|
||||
|
||||
SET log_queries=1;
|
||||
SELECT * FROM data_01283 LIMIT 1 FORMAT Null;
|
||||
SET log_queries=0;
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
-- 1 for PullingAsyncPipelineExecutor::pull
|
||||
-- 1 for AsynchronousBlockInputStream
|
||||
SELECT
|
||||
throwIf(count() != 1, 'no query was logged'),
|
||||
throwIf(length(thread_ids) != 2, 'too many threads used')
|
||||
FROM system.query_log
|
||||
WHERE type = 'QueryFinish' AND query LIKE '%data_01283 LIMIT 1%'
|
||||
GROUP BY thread_ids
|
||||
FORMAT Null;
|
Loading…
Reference in New Issue
Block a user