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

От: Tom Lane
Тема: Re: Is there an equivalent for Oracle's user_tables.num_rows
Дата: ,
Msg-id: 6478.1171068303@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Is there an equivalent for Oracle's user_tables.num_rows  ("Virag Saksena")
Ответы: Re: Is there an equivalent for Oracle'suser_tables.num_rows  ("Simon Riggs")
Список: pgsql-performance

Скрыть дерево обсуждения

Is there an equivalent for Oracle's user_tables.num_rows  ("Virag Saksena", )
 Re: Is there an equivalent for Oracle's user_tables.num_rows  (Tom Lane, )
  Re: Is there an equivalent for Oracle'suser_tables.num_rows  ("Simon Riggs", )
 Re: Is there an equivalent for Oracle's user_tables.num_rows  ("Virag Saksena", )

"Virag Saksena" <> 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 по дате сообщения:

От: "Merlin Moncure"
Дата:
Сообщение: Re: cube operations slower than geo_distance() on production server
От: Mark Stosberg
Дата:
Сообщение: Re: cube operations slower than geo_distance() on production server