Support the ongoing development of Laravel.io →
posted 9 years ago
Eloquent

The chunk method is starting to piss me off. Anyone have trouble with it? Two things: first it doesn't seem to do what it advertises. There are still memory issues even on the simplest of queries. Talking less than 10,000 records here, chunking to 200 records at a time. The ORM model is itself is very basic with only a couple of fields. I even have queryDisableLog() to no effect.

Second, it seems to stop for no reason and doesn't throw any errors, so only some records are processed and others are not. In a migration script I would have to run it several times to get all records, which defeats the purpose of chunking in the first place.

Please let me know if anyone has any insight into this thing.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.