Re: Is there an equivalent for Oracle'suser_tables.num_rows - Mailing list pgsql-performance

From Simon Riggs
Subject Re: Is there an equivalent for Oracle'suser_tables.num_rows
Date
Msg-id 1171069598.25938.151.camel@silverbirch.site
Whole thread Raw
In response to Re: Is there an equivalent for Oracle's user_tables.num_rows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Fri, 2007-02-09 at 19:45 -0500, Tom Lane wrote:
> "Virag Saksena" <virag@auptyma.com> writes:
> > Does someone know of a way of telling what the optimizer believes the =
> > number of rows are ?
>
> You're looking in the wrong place; see pg_class.relpages and reltuples.
>
> But note that in recent releases neither one is taken as gospel.
> Instead the planner uses the current physical table size in place of
> relpages, and scales reltuples correspondingly.  So neither steady
> growth nor truncation create a need for re-ANALYZE; at least not as long
> as the other statistics don't change too much.

That does work very well for Production systems, but not for
Development.

In 8.4, I'll be looking for a way to export Production system stats to a
Dev server that *acts* as if it really had 10^lots rows in it. That will
also help us support the optimiser when it is acting in extreme
conditions that are not sensibly reproducible in reality by hackers. It
will also provide us with what-if capability for system expansion.

--
  Simon Riggs
  EnterpriseDB   http://www.enterprisedb.com



pgsql-performance by date:

Previous
From: "Virag Saksena"
Date:
Subject: Re: Is there an equivalent for Oracle's user_tables.num_rows
Next
From: "Merlin Moncure"
Date:
Subject: Re: cube operations slower than geo_distance() on production server