Re: Astonishing explain...!

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Astonishing explain...!
Дата
Msg-id 20020624194411.49896cf4.nconway@klamath.dyndns.org
обсуждение исходный текст
Ответ на Astonishing explain...!  (Mike Harding <mvh@ix.netcom.com>)
Ответы Re: Astonishing explain...!  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
On Mon, 24 Jun 2002 08:43:16 -0700 (PDT)
"Mike Harding" <mvh@ix.netcom.com> wrote:
> Why is a sequential scan be done for MAX of an indexed column?  This
> is obviously pretty painful for large tables...

This is an FAQ -- check the archives for much more discussion of it.
In short, the workaround is to create a btree index on the column
in question, and do:

SELECT num FROM boogers ORDER BY num LIMIT 1;

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC



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

Предыдущее
От: Oskar Berggren
Дата:
Сообщение: Re: SQL server application porting headache
Следующее
От: sugita@sra.co.jp
Дата:
Сообщение: Re: Blob like type