Re: Select max(foo) and select count(*) optimization

Поиск
Список
Период
Сортировка
От CoL
Тема Re: Select max(foo) and select count(*) optimization
Дата
Msg-id bte7eh$2jdt$1@news.hub.org
обсуждение исходный текст
Ответ на Re: Select max(foo) and select count(*) optimization  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Список pgsql-performance
Hi,

Shridhar Daithankar wrote:

>
> select relpages,reltuples from pg_class where relname=<tablename>;
>
> Assuming the stats are recent enough, it would be much faster and accurate..

this needs an analyze <tablename>; before select from pg_class, cause
only after analyze will update pg the pg_class

C.

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

Предыдущее
От: David Teran
Дата:
Сообщение: Re: optimizing Postgres queries
Следующее
От: Bradley Tate
Дата:
Сообщение: Slow query problem