On Wed, 9 Jan 2008 10:58:29 -0800
"Joshua D. Drake" <jd@commandprompt.com> wrote:
> > OK... we are getting near to the point. I understand the trade-off
> > problem in storing into indexes id the row is still there.
> > Is there a way to get the count of the rows that *may be* there,
> If you analyze regularly you can use pg_class. It isn't exact but is
> usually close enough (especially if you are just using it for
> something like pagination).
But what if I've a
select count(*) from table where condition;
where condition involves just indexed columns and I want to trust the
indexes and I'm not concerned of the deleted rows?
Just to get an estimate between reindexing cycles, that would be
perfect for paging.
pg_class does look as returning all the rows.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it