Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Memory usage with DBI

by seesik (Initiate)
on Oct 10, 2001 at 23:21 UTC ( #118090=note: print w/ replies, xml ) Need Help??


in reply to Re: Memory usage with DBI
in thread Memory usage with DBI

I wouldn't worry too much about it! :)

actually, i'd worry plenty about memory usage and caching result sets if i were Kozz. as was remarked, the fetchrow_ methods do precisely that: fetch a single result record. however the fetchall_ methods cache entire result sets locally; that can get pretty massive if you're querying against credit bureau data or some 120 GB instance.

it's usually a good idea to let the database server do as much work as possible, including summarization and grouping operations. sometimes you do need all query results before you can proceed, but more often than not, you can just process the results iteratively. and to reiterate Higle's comment, the dbms is usually much more conscientious about memory optimization than you'll be on the client side.

cheers.


Comment on Re: Re: Memory usage with DBI
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-09-19 16:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (143 votes), past polls