Re: Optimizing maximum/minimum queries (yet again) - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: Optimizing maximum/minimum queries (yet again)
Date
Msg-id 20050409052752.GA9500@wolff.to
Whole thread Raw
In response to Re: Optimizing maximum/minimum queries (yet again)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Optimizing maximum/minimum queries (yet again)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Apr 09, 2005 at 00:57:11 -0400, Tom Lane <tgl@sss.pgh.pa.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.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimizing maximum/minimum queries (yet again)
Next
From: Tom Lane
Date:
Subject: Re: Optimizing maximum/minimum queries (yet again)