Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine multiple LIMITs #35383

Closed
Tracked by #34846
ranma42 opened this issue Dec 23, 2024 · 0 comments · Fixed by #35384
Closed
Tracked by #34846

Combine multiple LIMITs #35383

ranma42 opened this issue Dec 23, 2024 · 0 comments · Fixed by #35384
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Milestone

Comments

@ranma42
Copy link
Contributor

ranma42 commented Dec 23, 2024

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.

ranma42 added a commit to ranma42/efcore that referenced this issue Dec 23, 2024
Fixes dotnet#35383 for trivial cases (constants/literals and repeated expressions).
ranma42 added a commit to ranma42/efcore that referenced this issue Dec 23, 2024
Fixes dotnet#35383 for trivial cases (constants/literals and repeated expressions).
@roji roji added this to the 10.0.0 milestone Dec 23, 2024
@roji roji self-assigned this Dec 23, 2024
ranma42 added a commit to ranma42/efcore that referenced this issue Dec 24, 2024
Fixes dotnet#35383 for trivial cases (constants/literals and repeated expressions).
roji pushed a commit that referenced this issue Dec 24, 2024
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants