Re: max() not using index

Поиск
Список
Период
Сортировка
От Peter Gibbs
Тема Re: max() not using index
Дата
Msg-id 004901c22d8f$20d81300$0b01010a@emkel.co.za
обсуждение исходный текст
Ответ на max() not using index  (Ralph Graulich <maillist@shauny.de>)
Ответы Re: max() not using index  (Ralph Graulich <maillist@shauny.de>)
Список pgsql-general
"Ralph Graulich" wrote:


> EXPLAIN SELECT MAX(dam_id) FROM dam;
> NOTICE:  QUERY PLAN:
>
> Aggregate  (cost=5774.65..5774.65 rows=1 width=4)
>   ->  Seq Scan on dam  (cost=0.00..5442.92 rows=132692 width=4)

select dam_id from dam order by dam_id desc limit 1;

--
Peter Gibbs
EmKel Systems



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

Предыдущее
От: "Peter Gibbs"
Дата:
Сообщение: Re: Using index with order desc
Следующее
От: Helge Bahmann
Дата:
Сообщение: Re: Using index with order desc