in reply to It's bad manners to slurp
I am aware of a similar issue with DBI code. In particular, the use of selectall or fetchall, compared with fetchrow. I have seen instances.
Depending on your DBD, calling fetchrow() may also slurp the entire result into memory. It just won't give it to you all at once, which might reduce memory usage to some degree in exchange for the added overhead in repeated fetchrow() calls.
If you're serious about avoiding this problem in DBI then you need to use LIMIT and OFFSET (or their cursorly equivalent) to step through your result set.
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: It's bad manners to slurp
by mpeppler (Vicar) on Apr 29, 2004 at 15:26 UTC | |
by samtregar (Abbot) on Apr 29, 2004 at 15:31 UTC | |
by tantarbobus (Hermit) on Apr 29, 2004 at 16:50 UTC | |
by eserte (Deacon) on Apr 29, 2004 at 17:12 UTC | |
by samtregar (Abbot) on Apr 29, 2004 at 20:03 UTC | |
| |
by samtregar (Abbot) on Apr 29, 2004 at 17:06 UTC | |
by mpeppler (Vicar) on Apr 29, 2004 at 16:03 UTC |