Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 68D1D9FB984 for ; Tue, 12 Jun 2007 11:28:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 44004-06 for ; Tue, 12 Jun 2007 11:28:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from globalrelay.com (mail1.globalrelay.com [204.92.49.200]) by postgresql.org (Postfix) with ESMTP id A45239FB6F0 for ; Tue, 12 Jun 2007 11:28:13 -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 143819763; Tue, 12 Jun 2007 07:28:11 -0700 From: "Dave Dutcher" To: "'Christo Du Preez'" , References: <466D65CA.6000503@mecola.com> <01d001c7ac43$ec686780$2e00a8c0@tridecap.com> <466E4D5E.6050103@mecola.com> Subject: Re: test / live environment, major performance difference Date: Tue, 12 Jun 2007 09:28:11 -0500 Message-ID: <025001c7acfd$e84d9390$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: Acesw+aN9yP/xS15QfODzRWDrU3ZUgAOD/sg In-Reply-To: <466E4D5E.6050103@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.09 tagged_above=0 required=5 tests=AWL=0.089, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/208 X-Sequence-Number: 25241 > From: Christo Du Preez > Sent: Tuesday, June 12, 2007 2:38 AM > > Where do I set the planner settings or are you reffering to > settings in postgres.conf that may affect the planner? > Yes I'm reffering to settings in postgres.conf. I'm wondering if enable_indexscan or something got turned off on the server for some reason. Here is a description of those settings: http://www.postgresql.org/docs/8.2/interactive/runtime-config-query.html So when you move data from the laptop to the server, I see that your script correctly runs an analyze after the load, so have you run analyze on the fast laptop lately? Hopefully running analyze wouldn't make the planner choose a worse plan on the laptop, but if we are trying to get things consistant between the laptop and server, that is something I would try. If the consistancy problem really is a problem of the planner not using index scans on the server, then if you can, please post the table definition for the table with a million rows and an EXPLAIN ANALYZE of a query which selects a few rows from the table. Dave