Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 5C2F09FB9B4 for ; Wed, 14 Feb 2007 04:54:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 82400-03 for ; Wed, 14 Feb 2007 04:54:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4C8429FBAFF for ; Wed, 14 Feb 2007 04:53:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1E8rsHh020032; Wed, 14 Feb 2007 03:53:54 -0500 (EST) To: Brian Herlihy cc: Postgresql Performance Subject: Re: An unwanted seqscan In-reply-to: <379816.98018.qm@web52311.mail.yahoo.com> References: <379816.98018.qm@web52311.mail.yahoo.com> Comments: In-reply-to Brian Herlihy message dated "Wed, 14 Feb 2007 00:40:13 -0800" Date: Wed, 14 Feb 2007 03:53:54 -0500 Message-ID: <20031.1171443234@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/146 X-Sequence-Number: 23200 Brian Herlihy writes: > I am having trouble understanding why a seqscan is chosen for this query. As far as anyone can see from this output, the planner's decisions are correct: it prefers the plans with the smaller estimated cost. If you want us to take an interest, provide some more context --- EXPLAIN ANALYZE output for starters. regards, tom lane