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

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Select max(foo) and select count(*) optimization
Дата
Msg-id 87oeth537f.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Select max(foo) and select count(*) optimization  (John Siracusa <siracusa@mindspring.com>)
Список pgsql-performance
Paul Tuckfield <paul@tuckfield.com> writes:

> In the case of select count(*), one optimization is to do  a scan of the
> primary key, not the table itself, if the table has a primary key. In a
> certain commercial, lesser database, this is called an "index fast full
> scan".  It would be important to scan the index in physical order
> (sequential physical IO) and not in key order (random physical IO)

That won't work because you still have to hit the actual tuple to
determine visibility.

-Doug

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

Предыдущее
От: Paul Tuckfield
Дата:
Сообщение: Re: Select max(foo) and select count(*) optimization
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Select max(foo) and select count(*) optimization