Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3B21A632488 for ; Fri, 20 Mar 2009 21:37:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 29896-05 for ; Fri, 20 Mar 2009 21:37:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D8853632465 for ; Fri, 20 Mar 2009 21:37:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2L0bKV2012522; Fri, 20 Mar 2009 20:37:20 -0400 (EDT) To: Robert Haas cc: Anne Rosset , Richard Huxton , pgsql-performance@postgresql.org Subject: Re: Need help with one query In-reply-to: <603c8f070903201204s53f2a3cvbf9afc8649b2201a@mail.gmail.com> References: <49C2AC75.5060601@collab.net> <49C3600E.20504@archonet.com> <49C3CF52.9090602@collab.net> <603c8f070903201204s53f2a3cvbf9afc8649b2201a@mail.gmail.com> Comments: In-reply-to Robert Haas message dated "Fri, 20 Mar 2009 15:04:57 -0400" Date: Fri, 20 Mar 2009 20:37:20 -0400 Message-ID: <12521.1237595840@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL=0.010 X-Spam-Level: X-Archive-Number: 200903/311 X-Sequence-Number: 33233 Robert Haas writes: > On Fri, Mar 20, 2009 at 1:16 PM, Anne Rosset wrote: >> The db version is 8.2.4 > Something is wrong here. How can setting enable_seqscan to off result > in a plan with a far lower estimated cost than the original plan? Planner bug no doubt ... given how old the PG release is, I'm not particularly interested in probing into it now. If Anne can still reproduce this behavior on 8.2.something-recent, we should look closer. regards, tom lane