Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 54792650191 for ; Wed, 6 Aug 2008 23:48:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49209-02-3 for ; Wed, 6 Aug 2008 23:47:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.61.230.242]) by postgresql.org (Postfix) with ESMTP id 43B6665013E for ; Wed, 6 Aug 2008 23:47:30 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 39C8E5C108; Thu, 7 Aug 2008 10:47:22 +0800 (WST) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 281F41E0434; Thu, 7 Aug 2008 10:47:22 +0800 (WST) Message-ID: <489A623A.4090400@postnewspapers.com.au> Date: Thu, 07 Aug 2008 10:47:22 +0800 From: Craig Ringer User-Agent: Icedove 1.5.0.14eol (X11/20080509) MIME-Version: 1.0 To: Joshua Shanks Cc: pgsql-performance@postgresql.org Subject: Re: query planner not using the correct index References: <84f0acdb0808061435q5ebb607cjc311f1eb4da841a@mail.gmail.com> In-Reply-To: <84f0acdb0808061435q5ebb607cjc311f1eb4da841a@mail.gmail.com> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/23 X-Sequence-Number: 30904 Joshua Shanks wrote: > This query is run on a test system just after a backup of the database > has been restored and it does exactly what I expect it to do [snip] Obvious questions: - Have you changed the random page cost on either installation? - Have both installations had VACUUM ANALYZE run recently? - Are the stats targets the same on both installations? - Do both installations have similar shared buffers, total available RAM info, etc? -- Craig Ringer