>
> On Sun, 29 Jun 1997, Bruce Momjian wrote:
>
> > >
> > > On Sun, 29 Jun 1997, Bruce Momjian wrote:
> > >
> > > > > On Sun, 29 Jun 1997, Bruce Momjian wrote:
> >
> > But then, what is the goal? A temp table is going to be a performance
> > hit, and so is passing one row at a time from the backend.
>
> I see two goals, first you save memory on the client. Next you
> improve performance since you don't have to transfer all of a large
> dataset to a client. On a multi-megabyte result this can be a
> very big win.
OK, saving memory on the client is a valid goal. You could process and
discard one before getting the next row.
As far as performance, if you are going to want to look at all the rows,
you might as well get them all at once. There is no temp table on the
server side, and the transfer via the socket happens with only one
request to the backend. Much faster.
- --
Bruce Momjian
maillist@candle.pha.pa.us
------------------------------