[fw-general] Large DB recordset, while/loop, update rows

2010-08-20 Thread Terre Porter
Hey all, I'm trying to loop through a large growing record set, using code like: $options = array( Zend_Db::AUTO_QUOTE_IDENTIFIERS => false ); $db = Zend_Db::factory ( $config['database.adapter'], array ( 'host' => $config['database.params.host'], 'dbname' => $config[

Re: [fw-general] Large DB recordset, while/loop, update rows

2010-08-20 Thread Bill Karwin
On Aug 20, 2010, at 7:32 AM, Terre Porter wrote: I'm guessing this is because I'm reusing the $db and since it is not a buffered result it overwrites the original query with the update query. (am I guessing right?) Right, you can't execute another SQL statement until you finish fetching

RE: [fw-general] Large DB recordset, while/loop, update rows

2010-08-20 Thread Terre Porter
Thanks for the info. I ended up going with something similar to #2, collect the ID's then update them after processing. I'm working in a way for the process to grab 1000 records, and then process them, and then grab a 1000 more, rinse and repeat. Right now it's taking under 1 min to proce