pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Thomas Swan <tswan@idigx.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: scott.marlowe <scott.marlowe@ihs.com>
Cc: Neil Conway <neilc@samurai.com>
Cc: Pailloncy Jean-Gérard <pailloncy@ifrance.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: slow plan for min/max
Date: Tue, 9 Sep 2003 14:34:28 -0500
Message-ID: <20030909193428.GA15389@wolff.to> (raw)
In-Reply-To: <3F5E24D0.4040309@idigx.com>
References: <Pine.LNX.4.33.0309081434150.11709-100000@css120.ihs.com>
	<3303.1063056376@sss.pgh.pa.us>
	<3F5E24D0.4040309@idigx.com>

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.



view thread (20+ messages)  latest in thread

Message-ID: <20030909193428.GA15389@wolff.to>
Permalink:  ../20030909193428.GA15389@wolff.to/
Also on:    postgresql.org/message-id/20030909193428.GA15389@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bruno@wolff.to, tswan@idigx.com, tgl@sss.pgh.pa.us, scott.marlowe@ihs.com, neilc@samurai.com, pailloncy@ifrance.com
  Subject: Re: slow plan for min/max
  In-Reply-To: <20030909193428.GA15389@wolff.to>
  References: <Pine.LNX.4.33.0309081434150.11709-100000@css120.ihs.com> <3303.1063056376@sss.pgh.pa.us> <3F5E24D0.4040309@idigx.com> <20030909193428.GA15389@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox