From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Complete row is fetched ? |
Date: | 2010-04-16 12:14:24 |
Message-ID: | 4BC854A0.8050907@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2010-04-16 12:30:43 | Re: Complete row is fetched ? |
Previous Message | dipti shah | 2010-04-16 12:13:30 | Re: How to get whether user has ALL permissions on table? |