pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Virag Saksena <virag@auptyma.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Is there an equivalent for Oracle'suser_tables.num_rows
Date: Sat, 10 Feb 2007 01:06:37 +0000
Message-ID: <1171069598.25938.151.camel@silverbirch.site> (raw)
In-Reply-To: <6478.1171068303@sss.pgh.pa.us>
References: <00aa01c74ca6$7392a160$2900000a@demo01>
	<6478.1171068303@sss.pgh.pa.us>

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





Message-ID: <1171069598.25938.151.camel@silverbirch.site>
Permalink:  ../1171069598.25938.151.camel@silverbirch.site/
Also on:    postgresql.org/message-id/1171069598.25938.151.camel@silverbirch.site

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: simon@2ndquadrant.com, tgl@sss.pgh.pa.us, virag@auptyma.com
  Subject: Re: Is there an equivalent for Oracle'suser_tables.num_rows
  In-Reply-To: <1171069598.25938.151.camel@silverbirch.site>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox