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

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jonathan Bartlett <johnnyb(at)eskimo(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dann Corbit <DCorbit(at)connx(dot)com>, jim(at)nasby(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: Index not being used in MAX function (7.2.3)
Date: 2003-06-11 18:30:05
Message-ID: 20030611183005.GB17221@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 11, 2003 at 10:44:22 -0700,
Jonathan Bartlett <johnnyb(at)eskimo(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Network Administrator 2003-06-11 18:31:14 Re: [GENERAL] MySQL gets $19.5 MM
Previous Message Erik Price 2003-06-11 18:24:57 Re: some unrelated questions