Re: seq scan in the case of max() on the primary key column

Поиск
Список
Период
Сортировка
От Jesper Krogh
Тема Re: seq scan in the case of max() on the primary key column
Дата
Msg-id 4DFA3749.3000306@krogh.cc
обсуждение исходный текст
Ответ на seq scan in the case of max() on the primary key column  (Svetlin Manavski <svetlin.manavski@gmail.com>)
Список pgsql-performance
On 2011-06-16 15:55, Svetlin Manavski wrote:
> Hi everybody,
>
> I am running PostgreSQL 9.0 which performs well in most of the cases. I
> would skip all the parameters if these are not necessary.
>
> I need to frequently (every min) get the max value of the primary key column
> on some tables, like this case which works perfectly well:
>
> explain analyze select max(id) from appqosdata.tcpsessions;

Typically this is due to "batch load" and failing to run "analyze"
manually afterwards.. is this the case?

--
Jesper

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

Предыдущее
От: Svetlin Manavski
Дата:
Сообщение: seq scan in the case of max() on the primary key column
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: seq scan in the case of max() on the primary key column