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

[5.3] Avoid extraneous database query when last chunk is partial #16180

Merged
merged 5 commits into from
Oct 31, 2016
Merged

[5.3] Avoid extraneous database query when last chunk is partial #16180

merged 5 commits into from
Oct 31, 2016

Conversation

vlakoff
Copy link
Contributor

@vlakoff vlakoff commented Oct 30, 2016

Example:
Table has 750 rows. Currently chunk(500) would execute 3 queries whereas only 2 are needed.

Inspired for this PR while having a quick look back at laravel/ideas#103 and #9681.
(ping @kevindoole, maybe you would be interested by these)

@vlakoff
Copy link
Contributor Author

vlakoff commented Oct 30, 2016

chunkById() methods should be modified as well. (refs #12861)

edit: done

@GrahamCampbell
Copy link
Member

Thanks for the PR. Looks interesting. :)

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

Successfully merging this pull request may close these issues.

3 participants