Re: PL/PgSQL for counting all rows in all tables.

Поиск
Список
Период
Сортировка
От Ian FREISLICH
Тема Re: PL/PgSQL for counting all rows in all tables.
Дата
Msg-id E1CEl8Q-0006ut-00@hetzner.co.za
обсуждение исходный текст
Ответ на Re: PL/PgSQL for counting all rows in all tables.  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-hackers
"Greg Sabino Mullane" wrote:
> ANALYZE;
>  
> SELECT n.nspname, relname, reltuples
> FROM pg_class c, pg_namespace n
> WHERE c.relnamespace=n.oid
> AND relkind='r'
> AND NOT n.nspname ~ '^pg_'
> ORDER BY 1,2;

Maybe this gem should be passed onto the pgadmin folks.  When you
click on a table name in the interface it does what I can only
presume is a count(*) from relation, which takes forever on enormous
relations.  It then claims this to be a row estimate anyway, so
they could probably drop the analyze.

Ian

--
Ian Freislich


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stefan Kaltenbrunner
Дата:
Сообщение: Re: -HEAD build failure on OpenBSD 3.6-current/Sparc64
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: PL/PgSQL for counting all rows in all tables.