Re: Why dose the planner select one bad scan plan.

From: 静安寺 <asen_huang(at)qq(dot)com>
To: tv <tv(at)fuzzy(dot)cz>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>, tgl <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Why dose the planner select one bad scan plan.
Date: 2010-11-11 07:03:45
Message-ID: tencent_7D7D734B000FD7EA1CF49B10@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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 said “In principle a bitmap index scan should be significantly faster if the index can return the bitmap more or less "natively" rather than having to construct it. My recollection though is that a significant amount of work is needed to make that happen, and that there is no existing patch that tackled the problem. So I'm not sure that this report should be taken as indicating that there's no chance of a SELECT performance improvement. What it does say is that we have to do that work if we want to make bitmap indexes useful.”

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 'Bitmap Index Scan' is real fast than 'Seq Scan'.

Best Regards!

Asen

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Віталій Тимчишин 2010-11-11 08:01:12 Re: anti-join chosen even when slower than old plan
Previous Message Mladen Gogala 2010-11-11 05:14:18 Re: anti-join chosen even when slower than old plan