Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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
Replies are listed 'Best First'.
Re: Re: Memory usage with DBI
by blakem (Monsignor) on Oct 10, 2001 at 23:50 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2016-05-26 07:56 GMT
Find Nodes?
    Voting Booth?