Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D94A59FB676 for ; Mon, 30 Jul 2007 09:22:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 87129-08 for ; Mon, 30 Jul 2007 09:22:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from web35613.mail.mud.yahoo.com (web35613.mail.mud.yahoo.com [66.163.179.152]) by postgresql.org (Postfix) with SMTP id 718B19FB61F for ; Mon, 30 Jul 2007 09:22:39 -0300 (ADT) Received: (qmail 5373 invoked by uid 60001); 30 Jul 2007 12:22:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rocketmail.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=pNTWlM/hN1iLzOWLkhZDINoB18wayGil+aT4sKj04AVm/gXUtGgzhFIBdBfcKzWyWgFFpSOe3js5QNCv95azenuRmAJy0h8PBcMhwoc0DE8RSPf66bBCUzAHUbWFv094AMXTrWg3XFkgOfeMEs7ak7v2eQBraewNevMp9Tb8GTs=; X-YMail-OSG: 8Z30d3cVM1lHPHIx85xliY3CohQbfiQkvSvyPET2nbC8M0SYf0h7g.X4i4bg1lWEkPaGRvyyR9x7RSbUMSY4uH1avw-- Received: from [65.35.187.117] by web35613.mail.mud.yahoo.com via HTTP; Mon, 30 Jul 2007 05:22:38 PDT Date: Mon, 30 Jul 2007 05:22:38 -0700 (PDT) From: Lewis Cunningham Subject: Re: [SQL] Tunning PostgreSQL performance for views on Windows To: Ranieri Mazili , pgsql-general@postgresql.org, pgsql-sql@postgresql.org In-Reply-To: <46A8AF1B.4090607@terra.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <124206.3554.qm@web35613.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/1152 X-Sequence-Number: 117753 How big are the underlying tables? If they are large, are you partitioning? Since the values only change daily, if the end result is a reasonable size, have you considered using a CTAS rather than views? LewisC --- Ranieri Mazili wrote: > 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 > > > ---------------------------(end of > broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > ----------------------------------------------------------- Lewis R Cunningham An Expert's Guide to Oracle Technology http://blogs.ittoolbox.com/oracle/guide/ EnterpriseDB: The Definitive Reference http://tinyurl.com/39246e ----------------------------------------------------------