Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 321781337B34 for ; Mon, 7 Feb 2011 06:47:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 47574-07 for ; Mon, 7 Feb 2011 10:47:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brublucs01.mactelecom.net (brublucs01.mactelecom.net [217.64.240.242]) by mail.postgresql.org (Postfix) with ESMTP id EEF591336971 for ; Mon, 7 Feb 2011 06:47:08 -0400 (AST) Received: by brublucs01.mactelecom.net (Postfix, from userid 500) id 25CA9F6500; Mon, 7 Feb 2011 10:47:06 +0000 (UTC) Received: from smtp.eurofer.be (217.64.254.218.mactelecom.net [217.64.254.218]) by brublucs01.mactelecom.net (Postfix) with ESMTP id 775EFF64FB; Mon, 7 Feb 2011 10:47:05 +0000 (UTC) Received: from pc-1000.eurofer.be ([192.168.3.167]) by smtp.eurofer.be with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PmOcU-0002d4-PM; Mon, 07 Feb 2011 11:47:06 +0100 From: Guy Deleeuw To: Kevin Grittner Cc: pgsql-admin@postgresql.org In-Reply-To: <4D4E7861020000250003A4C9@gw.wicourts.gov> References: <4D4E7861020000250003A4C9@gw.wicourts.gov> Content-Type: text/plain; charset="UTF-8" Date: Mon, 07 Feb 2011 11:46:55 +0100 Message-ID: <1297075615.1961.3.camel@pc-1000> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Spam_score: -4.4 X-SA-Exim-Connect-IP: 192.168.3.167 X-SA-Exim-Mail-From: G.De_Leeuw@eurofer.be Subject: Re: How to X-SA-Exim-Scanned: Yes (on smtp.eurofer.be) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201102/29 X-Sequence-Number: 36668 Hello Kevin, > > You should probably look at reqorking the v_stock view to use joins > instead of subqueries -- they often optimize much better. This is the problem effectively. For creating this view I use a query tools that generate the code, not a good idea. I update and work now :-) Best regards Guy