From: Tom Lane <tgl@sss.pgh.pa.us>
To: Virag Saksena <virag@auptyma.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Is there an equivalent for Oracle's user_tables.num_rows
Date: Fri, 09 Feb 2007 19:45:03 -0500
Message-ID: <6478.1171068303@sss.pgh.pa.us> (raw)
In-Reply-To: <00aa01c74ca6$7392a160$2900000a@demo01>
References: <00aa01c74ca6$7392a160$2900000a@demo01>
"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.
regards, tom lane
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: tgl@sss.pgh.pa.us, virag@auptyma.com
Subject: Re: Is there an equivalent for Oracle's user_tables.num_rows
In-Reply-To: <6478.1171068303@sss.pgh.pa.us>
* 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