On Thu, Nov 11, 2010 at 3:43 AM, wrote:
>> Okay, I want to know how the planner computes the cost of constructing
>> bitmap. And when the planner computes the cost of 'Bitmap Index Scan', if
>> it considers the influence of memory cache? As when I do not clear the
>> memory cache, I find the 'Bit
Thanks for your answer! And I am sorry for trading the question as a bug, and
send it to 'bugs' mailing-list.
But I doubt your answer. I think the essence of the problem is when the planner
selects 'Bitmap Index Scan' and how the planner computes the cost of 'Bitmap
Index Scan'.
Tom Lane s
> But I doubt your answer. I think the essence of the problem is when the
> planner selects 'Bitmap Index Scan' and how the planner computes the cost
> of 'Bitmap Index Scan'.
The essence of the problem obviously is a bad estimate of the cost. The
planner considers the two plans, computes the cost
> Okay, 225044.255ms VS 83813.808 ms, it obviously seems that the planner
> select one bad scan plan by default.
Actually no, the planner chose the cheapest plan (more precisely a plan
with the lowest computed cost). The first plan has a cost 600830.86 while
the second one has a cost 634901.28, so