Re: Is there an equivalent for Oracle's user_tables.num_rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Virag Saksena" <virag@xxxxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux