Re: Optimizing maximum/minimum queries (yet again)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizing maximum/minimum queries (yet again)
Date: 2005-04-09 05:27:52
Message-ID: 20050409052752.GA9500@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 09, 2005 at 00:57:11 -0400,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I don't have a problem with that, but I haven't quite convinced myself
> that we need to expend the cycles to check for it, either ...

You could have two different aggregates and end up with values
that could happen if the same set of rows was used to evaluate both.
I would expect that the sequential plan would be better for a volatile
where clause since you are going to execute it for every row anyway.
So disabling the optimization in that case isn't normally going to
slow things down.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message PFC 2005-04-09 11:25:47 Re: Functionscan estimates
Previous Message Tom Lane 2005-04-09 05:25:09 Re: Optimizing maximum/minimum queries (yet again)