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 5ca91ee80575cabb68953effe8b202dc
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: aixssd!darrenk@abs.net (Darren King)
Date:
Subject: Re: [HACKERS] Problem with copying abstimes
Next
From: The Hermit Hacker
Date:
Subject: date format: Canada same as European or US?