Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2744A632DD4 for ; Fri, 20 Mar 2009 16:15:16 -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 59621-03 for ; Fri, 20 Mar 2009 16:15:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 9AD7163297E for ; Fri, 20 Mar 2009 16:15:12 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-101-194.bk7-dsl.surnet.cl [200.126.101.194]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id n2KJLhUO022069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Mar 2009 12:21:47 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CC6D947CDF; Fri, 20 Mar 2009 15:14:53 -0400 (CLT) Date: Fri, 20 Mar 2009 15:14:53 -0400 From: Alvaro Herrera To: Robert Haas Cc: Anne Rosset , Richard Huxton , pgsql-performance@postgresql.org Subject: Re: Need help with one query Message-ID: <20090320191453.GM8313@alvh.no-ip.org> References: <49C2AC75.5060601@collab.net> <49C3600E.20504@archonet.com> <49C3CF52.9090602@collab.net> <603c8f070903201204s53f2a3cvbf9afc8649b2201a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <603c8f070903201204s53f2a3cvbf9afc8649b2201a@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Fri, 20 Mar 2009 12:21:48 -0700 (PDT) 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: 200903/299 X-Sequence-Number: 33221 Robert Haas escribió: > 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? If > the planner thought the non-seq-scan plan is cheaper, it would have > picked that one to begin with. GEQO? Anne, what's geqo_threshold set to? -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.