Re: Most efficient report of number of records in all tables? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Most efficient report of number of records in all tables?
Date
Msg-id b42b73150702261820q686b36edhea875360d1b502ad@mail.gmail.com
Whole thread Raw
In response to Re: Most efficient report of number of records in all tables?  ("D. Dante Lorenso" <dante@lorenso.com>)
List pgsql-general
On 2/27/07, D. Dante Lorenso <dante@lorenso.com> wrote:
> Dann Corbit wrote:
> > If you only need a cardinality estimate, then pg_class.reltuples may be
> > of help (it will be accurate to when the last vacuum was performed).
> >
>
> Last vacuum ... how does that work with autovacuum?

'analyze' updates pg_class.reltuples also.  It is also cheaper than
vacuum...you can force a fresh one by doing an analyze before you do
your sweep.

merlin

pgsql-general by date:

Previous
From: George Nychis
Date:
Subject: Re: dropping a master table and all of its partitions?
Next
From: Tom Lane
Date:
Subject: Re: preventing ALTER TABLE RENAME from changing view definitions?