Re: Index not being used in MAX function (7.2.3)

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Index not being used in MAX function (7.2.3)
Дата
Msg-id 20030611183005.GB17221@wolff.to
обсуждение исходный текст
Ответ на Re: Index not being used in MAX function (7.2.3)  (Jonathan Bartlett <johnnyb@eskimo.com>)
Список pgsql-general
On Wed, Jun 11, 2003 at 10:44:22 -0700,
  Jonathan Bartlett <johnnyb@eskimo.com> wrote:
> I wonder if a macro system might be warranted - then have max be a macro
> instead of an aggregate.  However, I don't know exactly how that would
> work since it involves the whole statement.  Anyway, just an idea to
> hopefully spur someone else's thinking cap :)

I don't think that would work. There are going to be some cases
where the aggregate is better than the subselect (and not just when
there isn't an appropiate index). And in some cases distinct on order by
may be the best way to get what you want.

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

Предыдущее
От: Erik Price
Дата:
Сообщение: Re: some unrelated questions
Следующее
От: Network Administrator
Дата:
Сообщение: Re: [pgsql-advocacy] MySQL gets $19.5 MM