Re: Index not being used in MAX function (7.2.3) - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Index not being used in MAX function (7.2.3)
Date
Msg-id 20030611183005.GB17221@wolff.to
Whole thread Raw
In response to Re: Index not being used in MAX function (7.2.3)  (Jonathan Bartlett <johnnyb@eskimo.com>)
List 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 by date:

Previous
From: Erik Price
Date:
Subject: Re: some unrelated questions
Next
From: Network Administrator
Date:
Subject: Re: [pgsql-advocacy] MySQL gets $19.5 MM