Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 01D0B9FA502 for ; Mon, 11 Jun 2007 15:24:02 -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 02422-06 for ; Mon, 11 Jun 2007 15:23:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.emolecules.com (66-226-76-106.dedicated.abac.net [66.226.76.106]) by postgresql.org (Postfix) with ESMTP id DC1E99FA4F4 for ; Mon, 11 Jun 2007 15:23:57 -0300 (ADT) Received: (qmail 31309 invoked by uid 2020); 11 Jun 2007 11:23:56 -0700 Received: from wsip-68-224-174-233.sd.sd.cox.net (HELO ?192.168.0.3?) (68.224.174.233) by 192.168.0.4 with SMTP; 11 Jun 2007 11:23:56 -0700 Message-ID: <466D93EF.4010300@emolecules.com> Date: Mon, 11 Jun 2007 11:26:55 -0700 From: Craig James User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 CC: pgsql-performance@postgresql.org Subject: Re: test / live environment, major performance difference References: <466D65CA.6000503@mecola.com> <20070611155849.GA8426@mail.planetcobalt.net> In-Reply-To: <20070611155849.GA8426@mail.planetcobalt.net> 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.085 tagged_above=0 required=5 tests=AWL=-0.051, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/197 X-Sequence-Number: 25230 On 2007-06-11 Christo Du Preez wrote: > I really hope someone can shed some light on my problem. I'm not sure > if this is a posgres or potgis issue. > > Anyway, we have 2 development laptops and one live server, somehow I > managed to get the same query to perform very well om my laptop, but > on both the server and the other laptop it's really performing bad. One simple possibility that bit me in the past: If you do pg_dump/pg_restore to create a copy of the database, you have to ANALYZE the newly-restored database. I mistakenly assumed that pg_restore would do this, but you have to run ANALYZE explicitely after a restore. Craig