Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1F15B12FE951 for ; Thu, 5 Apr 2012 12:34:56 -0300 (ADT) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SFoi6-0007t2-22 for pgsql-performance@postgresql.org; Thu, 05 Apr 2012 15:34:55 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 05 Apr 2012 10:34:40 -0500 Message-Id: <4F7D753C0200002500046BF5@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Thu, 05 Apr 2012 10:34:36 -0500 From: "Kevin Grittner" To: ,"Kim Hansen" Subject: Re: Planner selects slow "Bitmap Heap Scan" when "Index Scan" is faster References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201204/66 X-Sequence-Number: 46712 Kim Hansen wrote: > I have a query where the planner makes a wrong cost estimate, it > looks like it underestimates the cost of a "Bitmap Heap Scan" > compared to an "Index Scan". > What can I do to fix the cost estimate? Could you try running the query with cpu_tuple_cost = 0.05 and let us know how that goes? -Kevin