Ticket #861 (new enhancement)

Opened 5 months ago

Last modified 5 months ago

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

Changed 5 months ago by francois

Changed 5 months ago by francois

  • milestone changed from 1.5 to 1.6
Note: See TracTickets for help on using tickets.