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

From Tom Lane
Subject Re: Is there an equivalent for Oracle's user_tables.num_rows
Date
Msg-id 6478.1171068303@sss.pgh.pa.us
Whole thread Raw
In response to Is there an equivalent for Oracle's user_tables.num_rows  ("Virag Saksena" <virag@auptyma.com>)
Responses Re: Is there an equivalent for Oracle'suser_tables.num_rows  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: "Virag Saksena"
Date:
Subject: Is there an equivalent for Oracle's user_tables.num_rows
Next
From: "Virag Saksena"
Date:
Subject: Re: Is there an equivalent for Oracle's user_tables.num_rows