mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 18:20:50 +00:00
Do not reserve extra threads after max threads optimization for simple queries
Before this patch pipeline.setMaxThreads() was called with 0 (since streams.size() == 0, while pipes.size() == 1), which leads that pipeline.getMaxThreads() returns max_streams. While this threads were not used, they were reserved, which should not happens either.
This commit is contained in:
parent
36c7a486a1
commit
d4804e070f
@ -1533,7 +1533,7 @@ void InterpreterSelectQuery::executeFetchColumns(
|
||||
if constexpr (pipeline_with_processors)
|
||||
{
|
||||
if (streams.size() == 1 || pipes.size() == 1)
|
||||
pipeline.setMaxThreads(streams.size());
|
||||
pipeline.setMaxThreads(1);
|
||||
|
||||
/// Unify streams. They must have same headers.
|
||||
if (streams.size() > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user