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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to