X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0D344D1B502 for ; Fri, 10 Oct 2003 17:35:37 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 63480-07 for ; Fri, 10 Oct 2003 14:34:48 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 42570D1B4ED for ; Fri, 10 Oct 2003 14:34:46 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3750212; Fri, 10 Oct 2003 10:35:16 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Dror Matalon , Postgresql Performance Subject: Re: Speeding up Aggregates Date: Fri, 10 Oct 2003 10:32:32 -0700 User-Agent: KMail/1.4.3 References: <20031003202120.GO87525@rlx11.zapatec.com> <20031010013522.GB18596@wolff.to> <20031010035526.GT2979@rlx11.zapatec.com> In-Reply-To: <20031010035526.GT2979@rlx11.zapatec.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200310101032.32271.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/351 X-Sequence-Number: 4099 Dror, > Ouch. I just double checked and you're right. Is this considered a bug, > or just an implementation issue? It's an implementation issue, which may be fixed by 7.5 but not sooner. Basically, the free ability of PostgreSQL users to define their own aggregates limits our ability to define query planner optimization for aggregates. Only recently has anyone suggested a feasable way around this. > While I've seen this hint a few times in the lists, it seems like it's > one of those magic incantations that those in the know, know about, and > that people new to postgres are going to be surprised by the need to use > this idiom. It IS in the FAQ. -- Josh Berkus Aglio Database Solutions San Francisco