Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 469A89FB9DE for ; Mon, 11 Jun 2007 14:16:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52948-05 for ; Mon, 11 Jun 2007 14:16:48 -0300 (ADT) X-Greylist: delayed 00:59:58.797625 by SQLgrey-1.7.4 Received: from globalrelay.com (mail1.globalrelay.com [204.92.49.200]) by postgresql.org (Postfix) with ESMTP id 2D5A49FB9DA for ; Mon, 11 Jun 2007 14:16:48 -0300 (ADT) X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway X-GR-Acctd: YES Received: from [63.226.156.118] (HELO davedell) by globalrelay.com (CommuniGate Pro SMTP 4.2.3) with ESMTP id 143668873; Mon, 11 Jun 2007 09:16:47 -0700 From: "Dave Dutcher" To: "'Christo Du Preez'" , References: <466D65CA.6000503@mecola.com> Subject: Re: test / live environment, major performance difference Date: Mon, 11 Jun 2007 11:16:52 -0500 Message-ID: <01d001c7ac43$ec686780$2e00a8c0@tridecap.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcesPpiCRZsDrXVuQ/q2mmNun/OuWgAAlSTQ In-Reply-To: <466D65CA.6000503@mecola.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.094 tagged_above=0 required=5 tests=AWL=0.093, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/193 X-Sequence-Number: 25226 > -----Original Message----- > From: Christo Du Preez > Sent: Monday, June 11, 2007 10:10 AM > > I have narrowed down the problem (I think) and it's the query > planner using different plans and I haven't got a clue why. > Can anyone please shed some light on this? Different plans can be caused by several different things like different server versions, different planner settings in the config file, different schemas, or different statistics. You say the server versions are the same, so that's not it. Is the schema the same? One isn't missing indexes that the other has? Do they both have the same data, or at least very close to the same data? Have you run analyze on both of them to update their statistics? Do they have the same planner settings in the config file? I would check that stuff out and see if it helps. Dave