Re: Two Index Questions

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Two Index Questions
Дата
Msg-id 200207191112.49885.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Two Index Questions  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: Two Index Questions  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Two Index Questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Bruno, Tom,

> Typo. I meant to say columns. The issue is that max doesn't use an index,
> but if there are a lot of different values of G for a given A, B and C,
> it may be better to use an index then to search through the applicable
> rows to find the maximum.

That's odd ... you're correct.   Tom, why doesn't MAX() use an index?   I
understand why indexes are generally useless for SUM(), AVG, and COUNT, but
it seems that MAX() and MIN() should *always* use an index.

--
-Josh BerkusAglio Database SolutionsSan Francisco



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Two Index Questions
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Two Index Questions