Jean-Luc Lachance <jllachan(at)nsd(dot)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(at)samurai(dot)com> || PGP Key ID: DB3C29FC