Re: Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1
Дата
Msg-id 37ed240d0511270438l36cb2146le0657bb0f04d487e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-general
> Already done in 8.1.  Here's an excerpt from the Release Notes:
>
> Automatically use indexes for MIN() and MAX() (Tom)
>
>     In previous releases, the only way to use an index for MIN()
>     or MAX() was to rewrite the query as SELECT col FROM tab ORDER
>     BY col LIMIT 1.  Index usage now happens automatically.
>

Which query form will generally be faster in 8.1 (or will they be
exactly the same)?

BJ

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

Предыдущее
От: Együd Csaba
Дата:
Сообщение: Login limitation?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: FW: GRANT question