Re: slow plan for min/max - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: slow plan for min/max
Date
Msg-id 20030909193428.GA15389@wolff.to
Whole thread Raw
In response to Re: slow plan for min/max  (Thomas Swan <tswan@idigx.com>)
List pgsql-performance
On Tue, Sep 09, 2003 at 14:06:56 -0500,
  Thomas Swan <tswan@idigx.com> wrote:
>
> Would it be possible to rewrite min and max at the parser level into a
> select/subselect  (clause) condition ( repeat condition ) order by
> (clause ) descending/ascending limit 1 and thereby avoiding the
> penalties of altering the default aggregate behavior?  Would it yield
> anything beneficial?

That isn't always going to be the best way to do the calculation. If there
are other aggregates or if the groups are small, doing things the normal
way (and hash aggregates in 7.4 will help) can be faster.

pgsql-performance by date:

Previous
From: Thomas Swan
Date:
Subject: Re: slow plan for min/max
Next
From: Chris Huston
Date:
Subject: Reading data in bulk - help?