Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C9F869FB270 for ; Sat, 5 May 2007 18:30:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 12695-05 for ; Sat, 5 May 2007 18:30:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id A79959FB26C for ; Sat, 5 May 2007 18:30:24 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HkRpa-0001iN-WC for pgsql-sql@postgresql.org; Sat, 05 May 2007 17:30:19 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 7127D3F9E; Sat, 5 May 2007 17:30:09 -0400 (EDT) Date: Sat, 5 May 2007 17:30:09 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Sequence vs. Index Scan Message-ID: <20070505213009.GA22573@phlogiston.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/26 X-Sequence-Number: 28307 On Sat, May 05, 2007 at 04:05:52PM -0500, Aaron Bono wrote: > I have two schemas, both with the exact same DDL. One performs great and Do they have the same data? > I have > checked and there IS an index, specifically a primary key index, on the > branch_id in both schemas so I cannot figure out why the optimizer is > looking at these differently. In fact, the table the branch_id comes from > has the exact same indices and foreign keys on both schemas. Different data? Different statistics? Different numbers of (possibly dead) rows? A -- Andrew Sullivan | ajs@crankycanuck.ca Everything that happens in the world happens at some place. --Jane Jacobs