|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: fastest method to use DBIby moritz (Cardinal) |
| on Jul 07, 2009 at 07:26 UTC ( [id://777764]=note: print w/replies, xml ) | Need Help?? |
|
I think that a fetchall_arrayref is very memory intensive and not a good idea.
I guess that DBI or the underlying drives either batch operations automatically, or have options to do so, or don't do it because it's not efficient. Either way I don't think that your "manual" caching will do very much good. Also you're using ->bind_columns(\$number, \$id,\$start_dat,\$end_dat); which means that after each ->fetch() the variables $number, $id etc have the new values. This is efficient, but only if you use ->fetch(), not ->fetchall_arrayref (which duplicates the work).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||