Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Memory usage with DBI

by CubicSpline (Friar)
on Oct 10, 2001 at 23:24 UTC ( #118091=note: print w/ replies, xml ) Need Help??


in reply to Memory usage with DBI

I agree with higle that you don't have to worry about the number of rows that will be returned, but I would warn you about doing "SELECT *". There are probably a number of discourses about this on the site, but it's generally a good idea to only select the fields that you need. Especially when you are looking at pumping those fields into an array, if you have lots of columns that makes things messy, especially if someone else has to look at your code and figure out why you are wanting $a[0], $a[3], and $a[17] from the result array. This will also speed up the queries a bit because the database systems won't have to put together a result of all the columns. In general, it's just better practice not to SELECT *.


Comment on Re: Memory usage with DBI
Download Code
Re: Re: Memory usage with DBI
by blakem (Monsignor) on Oct 10, 2001 at 23:50 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-09-30 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (383 votes), past polls