Re: (Fwd) DBI's method for reading [row x,field y]
- From: Jacqui.Caren@xxxxxxxx (Jacqui Caren)
- Date: Wed, 28 Feb 2007 04:59:51 +0000
Martin J. Evans wrote:
Of course, selectall/fetchall_arrayref retrieves all the rows in the result-set so this will use that amount of memory up but given you are already doing this I guess that won't bother you (unless Pg uses cursors to navigate to the required row). To my knowledge, DBI does not support fetching only a specific row via a cursor but I'm sure someone will correct me if I'm wrong on that.
PostgreSQL does NOT provide any mechanism to navigate in the way bob
suggests. He is using a dataset driver and this is doing a fetchall_arrayref (equivalent) under the covers.
The other things I would point out that recent versions of
PostgreSQL will often randomly order result sets that do not have an
explicit order by clause. This is good as it is a significant
performance boost but does catch the unwary (including myself when I had
a missing order by clause!).
If the past I have found people using code similar to bobs without
an order by clause - often random results and perfomance (as system scales) instigate a complete redesign soon after.
Jacqui
.
- Follow-Ups:
- References:
- (Fwd) DBI's method for reading [row x,field y]
- From: Tim Bunce
- Re: (Fwd) DBI's method for reading [row x,field y]
- From: Martin J. Evans
- (Fwd) DBI's method for reading [row x,field y]
- Prev by Date: RE: (Fwd) DBI's method for reading [row x,field y]
- Next by Date: Re: (Fwd) DBI's method for reading [row x,field y]
- Previous by thread: Re: (Fwd) DBI's method for reading [row x,field y]
- Next by thread: Re: (Fwd) DBI's method for reading [row x,field y]
- Index(es):
Relevant Pages
|