X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9CAE5D1B1AA for ; Wed, 4 Aug 2004 12:53:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79334-07 for ; Wed, 4 Aug 2004 15:53:30 +0000 (GMT) Received: from boutiquenumerique.com (gailleton-2-82-67-9-10.fbx.proxad.net [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 322CBD1B1B4 for ; Wed, 4 Aug 2004 12:53:28 -0300 (ADT) Received: (qmail 5166 invoked from network); 4 Aug 2004 17:53:27 +0200 Received: from unknown (HELO musicbox) (192.168.0.2) by gailleton-2-82-67-9-10.fbx.proxad.net with SMTP; 4 Aug 2004 17:53:27 +0200 To: pgsql-performance@postgresql.org Subject: Re: Tuning queries on large database References: <200408041412.i74ECYO19577@mu.meteo.fr> Message-ID: Date: Wed, 04 Aug 2004 17:53:27 +0200 From: =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?= Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <200408041412.i74ECYO19577@mu.meteo.fr> User-Agent: Opera M2/7.50 (Linux, build 673) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/56 X-Sequence-Number: 7692 You often make sums. Why not use separate tables to cache these sums by month, by poste, by whatever ? Rule on insert on the big table updates the cache tables.