Re: Why dose the planner select one bad scan plan. - Mailing list pgsql-performance

From Robert Haas
Subject Re: Why dose the planner select one bad scan plan.
Date
Msg-id AANLkTimpLrX9ZcCAZs9i25zbOCfewjcoQBY=E9+XBCsN@mail.gmail.com
Whole thread Raw
In response to Re: Why dose the planner select one bad scan plan.  (tv@fuzzy.cz)
List pgsql-performance
On Thu, Nov 11, 2010 at 3:43 AM,  <tv@fuzzy.cz> 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 'Bitmap Index Scan' is real fast than 'Seq
>> Scan'.
>
> There are two things here - loading the data from a disk into a cache
> (filesystem cache at the OS level / shared buffers at the PG level), and
> then the execution itself.
>
> PostgreSQL estimates the first part using an effective_cache_size hint,
> and uses that to estimate the probability that the data are already in the
> filesystem cache.

No, it does not do that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: temporary tables, indexes, and query plans
Next
From: Mladen Gogala
Date:
Subject: Re: MVCC performance issue