Skip to content

too many threads / extra work for LIMIT 1 query #11104

@filimonov

Description

@filimonov

https://gist.github.com/filimonov/2863d99dff0dfdcabb14d4a96ce597f7

Related #5315

/** 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.
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-query-optimizerQuery plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions