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 a4a1bf80ba24f0b538a7d62974772170
Whole thread Raw
In response to [HACKERS] libpq: why we need to fetch all rows?  (Alexander Demenshin <aldem@techie.com>)
List pgsql-hackers
>
> After the table is created it will be stored to disk (costly), but in
> memory you would again keep only the Oid's so that malloc'ing every tuple
> won't be necessary,  offsetting the cost of a temporary table.
> Of course, we are talking about 10 - 100 thousand tuples where preloading
> an entire table into memory wouldn't even be possible if machine doesn't
> have enough ram..

You have to malloc every tuple because the result usually will come from
a few fields OF SEVERAL TABLES.  The cost of re-building the result for
every oid requested would be big.

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

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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] libpq: why we need to fetch all rows?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] libpq: why we need to fetch all rows?