Neal Clark wrote: > Ideally, I will be making iterators from SQL calls. The SQL will > limit the number of rows as best as I can, but there will be times I > need to iterate over every row. I read in one of the CPAN docs that > Rose::DB::Object::Iterator returns 'true iterators', i.e. the rows > are not loaded until you call next
The DBI drivers for most databases (and this includes Postgres and Oracle) will load the entire result set into your local machine's RAM even before you fetch the first row. With MySQL and Oracle, you can tell them not to do this. With Postgres, I think you have to use cursors. For MySQL, just do this before issuing your large query: $dbh->{'mysql_use_result'}=1; You probably want to set it back afterward, since the default is better for small queries (it frees up resources on the server faster). - Perrin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object