Re: Complete row is fetched ? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Complete row is fetched ?
Date
Msg-id 4BC854A0.8050907@postnewspapers.com.au
Whole thread Raw
In response to Re: Complete row is fetched ?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: Complete row is fetched ?  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-general
On 16/04/10 16:23, A. Kretschmer wrote:
> In response to Raymond O'Donnell :
>> On a related note, what happens when you do something like this? -
>>
>>    select count(*) ....
>>
>> Does any data actually get read?
>
> No, it check's only the visibility for each record ->  seq-scan.

... though in practice with OS and disk readahead this probably means
all the data actually gets read from disk, though PostgreSQL doesn't
have to process all of it.

I sometimes wonder if being able to store visibility info externally to
a tuple in a separate file - in condensed fixed-width form - would be
useful for performance, especially where the table has quite wide tuples
with types that are big-ish but not TOASTable. Sure, it'd be more disk
seeking but OTOH it'd be more likely to stick around  in  cache, could
even be put on other storage, etc.

I suspect that even testing the notion out would involve ripping out and
rewriting half of Pg's guts, though, so it's pretty much hot air anyway.

--
Craig Ringer

pgsql-general by date:

Previous
From: dipti shah
Date:
Subject: Re: How to get whether user has ALL permissions on table?
Next
From: Greg Smith
Date:
Subject: Re: Complete row is fetched ?