Re: [HACKERS] libpq: why we need to fetch all rows? - Mailing list pgsql-hackers

From Michael J. Miller Jr.
Subject Re: [HACKERS] libpq: why we need to fetch all rows?
Date
Msg-id d304b705c2519829b01aec65b53586d0
Whole thread Raw
In response to [HACKERS] libpq: why we need to fetch all rows?  (Alexander Demenshin <aldem@techie.com>)
List pgsql-hackers
On Sun, 29 Jun 1997, Bruce Momjian wrote:

>
> 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.

Flexibility is what this scheme buys.  If you want to take the whole thing,
you send a request to the database to send you the whole thing.  If you
want the first one hundred records, or records 3355 through the end,
you can get those as well.  Pretty much the client can do whatever it
wants, but it doesn't have to have say 3 million rows shoved down its throat
if it doesn't want them.

I believe for large data sets you have to have this sort of functionality,
at least with remote clients.

- -
Mike Miller             mke@netcom.com
- -

------------------------------

End of hackers-digest V1 #405
*****************************

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] libpq: why we need to fetch all rows?
Next
From: "Sergey V. Lunegov"
Date:
Subject: [HACKERS] subsribe