Re: btree index and max()

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема Re: btree index and max()
Дата
Msg-id 3936AE07.EFBBD2F5@austin.rr.com
обсуждение исходный текст
Ответ на btree index and max()  (leonbloy@sinectis.com.ar)
Ответы Re: btree index and max()
Список pgsql-general
leonbloy@sinectis.com.ar wrote:
>
> => explain select max(rid) from facturas;
> NOTICE:  QUERY PLAN:
>
> Aggregate  (cost=21139.66 rows=342414 width=4)
>   ->  Seq Scan on facturas  (cost=21139.66 rows=342414 width=4)
>
> I understand that the query planner cannot be so clever
> to grasp that this particular function (max or min)
> might be evaluated by just travelling the BTREE index.
> Am I correct?

I believe you are unfortunately correct.  :(

Regards,
Ed Loehr

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

Предыдущее
От: leonbloy@sinectis.com.ar
Дата:
Сообщение: btree index and max()
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: ALTERING A TABLE