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

Paginator should set limit in WHERE IN query #11774

Open
msiwak-edi opened this issue Dec 20, 2024 · 0 comments
Open

Paginator should set limit in WHERE IN query #11774

msiwak-edi opened this issue Dec 20, 2024 · 0 comments

Comments

@msiwak-edi
Copy link

In some cases, the database optimizer cannot correctly decide to use indexes in queries with WHERE IN. The solution is to force the index or, in cases like a paginator, to limit the query.

However, the paginator now clears the maxResults:

$whereInQuery->setFirstResult(0)->setMaxResults(null);

Some proof
Without limit:
Screenshot from 2024-12-20 15-01-58
With limit:
Screenshot from 2024-12-20 15-01-06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant