Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: fastest method to use DBI

by moritz (Cardinal)
on Jul 07, 2009 at 07:26 UTC ( [id://777764]=note: print w/replies, xml ) Need Help??


in reply to fastest method to use DBI

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).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://777764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-02-18 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.