Chunking Large Queries with Iterators in PHP
Chunking Large Queries with Iterators in PHP
When executing large queries it's usually best not to load the whole result set in one go. Memory isn't infinite and PHP isn't renowned for handling it very well. So the obvious answer is to chunk the large query in to lots of smaller queries. This is a simple method I use for hiding the fact the query is being chunked behind an iterator.
Comments (0)
