Skip to content

Combine multiple LIMITs #35383

@ranma42

Description

@ranma42

It is currently possible to end up with multiple consecutive LIMIT in a query.
This is especially likely when combined with other query optimizations (such as those that drop unneeded ORDER BY), as mentioned in #34831

Removing them avoids nesting queries and in some cases makes it possible to use a simpler join instead of an apply.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions