-
Notifications
You must be signed in to change notification settings - Fork 8.3k
too many threads / extra work for LIMIT 1 query #11104
Copy link
Copy link
Closed
Labels
comp-query-optimizerQuery plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...performance
Description
Related #5315
ClickHouse/src/Interpreters/InterpreterSelectQuery.cpp
Lines 1345 to 1348 in f2d438b
| /** Optimization - if not specified DISTINCT, WHERE, GROUP, HAVING, ORDER, LIMIT BY, WITH TIES but LIMIT is specified, and limit + offset < max_block_size, | |
| * then as the block size we will use limit + offset (not to read more from the table than requested), | |
| * and also set the number of threads to 1. | |
| */ |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-query-optimizerQuery plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...performance