Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1B3C19FB318 for ; Thu, 12 Oct 2006 03:55:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 07965-10 for ; Thu, 12 Oct 2006 06:55:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id A4B0D9FB2F5 for ; Thu, 12 Oct 2006 03:55:38 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (p549D0CF2.dip0.t-ipconnect.de [84.157.12.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 895C56599A; Thu, 12 Oct 2006 08:58:06 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id BD0DE18148BBF; Thu, 12 Oct 2006 08:55:35 +0200 (CEST) Message-ID: <452DE6E7.6050808@logix-tt.com> Date: Thu, 12 Oct 2006 08:55:35 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.7 (X11/20060927) MIME-Version: 1.0 To: brendan.curran@gmail.com Cc: AgentM , Pg Performance list Subject: Re: Scrub one large table against another (vmstat output) References: <452C1437.9040709@gmail.com> <63AAE7DF-0D71-4BE7-A62C-B08E7E3C35CE@themactionfaction.com> <452C252C.2030408@gmail.com> <452C3A54.7000908@gmail.com> <452D28EE.6000105@gmail.com> In-Reply-To: <452D28EE.6000105@gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/228 X-Sequence-Number: 21357 Hi, Brendan, Brendan Curran wrote: >> What prevents you from using an aggregate function? > > I guess I could actually obtain the results in an aggregate function and > use those to maintain a summary table. There is a web view that requires > 'as accurate as possible' numbers to be queried per group (all 40 groups > are displayed on the same page) and so constant aggregates over the > entire table would be a nightmare. That sounds just like a case for GROUP BY and a materialized view. Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org