Re: Win2K Questions - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: Win2K Questions
Date
Msg-id 3DCFDA27.5AF840D3@nsd.ca
Whole thread Raw
In response to Re: Win2K Questions  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: Win2K Questions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
This explains it all.

What would be involved in adding version and visibility to the index?

It would allow for scanning the index instead of the whole table for
many of the count() request.

JLL

Neil Conway wrote:
>
> Jean-Luc Lachance <jllachan@nsd.ca> writes:
> > unless id is indexed there is nothing that can be done with
> > select count(*) from table where id >10000;
> > Otherwise, the index should be scanned, not the table.
>
> Indexes don't store heap tuple visibility information; you'd need to
> scan the heap as well in order to determine which tuples your
> transaction can see.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Stale Process
Next
From: Tom Lane
Date:
Subject: Re: question about efficiency