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

[DoctrineDataSource] Allow not to use Doctrine's Paginator #1071

Open
jaroslavlibal opened this issue Feb 22, 2023 · 0 comments
Open

[DoctrineDataSource] Allow not to use Doctrine's Paginator #1071

jaroslavlibal opened this issue Feb 22, 2023 · 0 comments

Comments

@jaroslavlibal
Copy link
Contributor

In DoctrineDataSource the Paginator from Doctrine (Doctrine\ORM\Tools\Pagination\Paginator) is used for situations when JOIN or GROUP BY is used.

I assume this is because of the "to-many" relationships - we want the number of entries on the page match the selected number. In this case, however, Doctrine runs an additional SQL query to determine the number of results, which can take quite a long time on a large databases (DISTINCT, MIN, GROUP BY...).

This (if I am only using to-one relations) might not be necessary and I would like to be able to disable the use of the external Paginator from Doctrine.

Is that a legitimate request or am I missing something, please? My idea is e.g. new public method disableDoctrinePaginator() that stores this request in a private variable. This is then used in the existing private method usePaginator().

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

No branches or pull requests

1 participant