Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 529C89FB614; Thu, 26 Jul 2007 11:26:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 63524-06; Thu, 26 Jul 2007 11:26:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sr01-04.mta.terra.com.br (sr01-04.mta.terra.com.br [200.154.152.23]) by postgresql.org (Postfix) with ESMTP id DD35B9FB435; Thu, 26 Jul 2007 11:26:40 -0300 (ADT) Received: from disraeli.terra.com.br (disraeli.terra.com.br [200.176.10.19]) by bulimba.hst.terra.com.br (Postfix) with ESMTP id 3C74C165C1DB; Thu, 26 Jul 2007 11:26:38 -0300 (BRT) X-Terra-Karma: -2% X-Terra-Hash: 4a4a5abf8a1ad3977e6e26d0a130098d Received-SPF: pass (disraeli.terra.com.br: domain of terra.com.br designates 200.176.10.19 as permitted sender) client-ip=200.176.10.19; envelope-from=ranieri.oliveira@terra.com.br; helo=[172.16.2.72]; Received: from [172.16.2.72] (200-162-219-207.corp.ajato.com.br [200.162.219.207]) (authenticated user ranieri.oliveira) by disraeli.terra.com.br (Postfix) with ESMTP id 5B795384186; Thu, 26 Jul 2007 11:26:36 -0300 (BRT) Message-ID: <46A8AF1B.4090607@terra.com.br> Date: Thu, 26 Jul 2007 11:26:35 -0300 From: Ranieri Mazili User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Tunning PostgreSQL performance for views on Windows Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.684 tagged_above=0 required=5 tests=AWL=0.683, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200707/1078 X-Sequence-Number: 117679 Hello, I'm developing a BI and as database it's using postgresql 8.2, how data are very detailed, I'm creating a view to consolidate the most important data, but the performance of view is very poor, 1 minute to perform more or less without where clause. I need to know how I can increase the performance, if exist some option to do cache, because the view will change only one time per day. My configuration is default, without modifications after install. I'm using windows 2003 server with a dell server with 4GB of memory. To create the view, I created some functions, and then perform they on one select like: select A.field1, B.field2, ... from function_A() A, function_B() B... Is this the best way to do it? I appreciate any help. Thanks