Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Memory usage with DBI

by CubicSpline (Friar)
on Oct 10, 2001 at 23:24 UTC ( [id://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 *.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://118091]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found