From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | tv(at)fuzzy(dot)cz |
Cc: | "������" <asen_huang(at)qq(dot)com>, 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-14 23:00:58 |
Message-ID: | AANLkTimpLrX9ZcCAZs9i25zbOCfewjcoQBY=E9+XBCsN@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, Nov 11, 2010 at 3:43 AM, <tv(at)fuzzy(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Mladen Gogala | 2010-11-15 00:32:54 | Re: MVCC performance issue |
Previous Message | Tom Lane | 2010-11-14 15:55:05 | Re: temporary tables, indexes, and query plans |