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

From Bruce Momjian
Subject Re: [HACKERS] libpq: why we need to fetch all rows?
Date
Msg-id 10318fd292b9e9945be7994731a16314
Whole thread Raw
In response to [HACKERS] libpq: why we need to fetch all rows?  (Alexander Demenshin <aldem@techie.com>)
List pgsql-hackers
>
> What could be done (and this is similar to what PROGRESS database does..I
> think)...
> You could request a select on a very large table. The server will NOT
> load all tuples that match the select, but only the Oid's of these tuples.
> When you are ready to read data, you do fetch, at which time the oid is
> used to get an entire tuple. So neither the server nor the client ever
> keep in memory more than one tuple at a time. This might not even be too
> hard to implement..A list of Oid could be a double-linked list withch
> would make it easy to traverse it back and forth with NEXT/ PREV and other
> statements. A lookup table of portals/cursors and their corresponding Oid
> tables could be maintained by the server.

The problem is that most results are joins, and there are multiple oid's
to deal with .

- --
Bruce Momjian
maillist@candle.pha.pa.us

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

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] libpq: why we need to fetch all rows?
Next
From: "Michael J. Miller Jr."
Date:
Subject: Re: [HACKERS] libpq: why we need to fetch all rows?