Ticket #861 (new enhancement)
Iterator for batch processing
| Reported by: | francois | Owned by: | francois |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.6 |
| Component: | Runtime (PHP5) | Version: | 1.3.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
An iterator looking like PropelModelPager, allowing processing in batches of n records for very long lists. Something like:
$books= BookQuery::create()
->findForBatch();
foreach ($books as $book) { // makes one query every 10 books using on demand hydration
// do something
}
Note: the query should use where id > $lastId rather than OFFSET in order to scale with O(lg N) rather than O(n).
Change History
Note: See
TracTickets for help on using
tickets.