Re: why is bitmap index chosen for this query?

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: why is bitmap index chosen for this query?
Дата
Msg-id 20060518155906.GA6909@uio.no
обсуждение исходный текст
Ответ на why is bitmap index chosen for this query?  (Stephen Byers <stephenabyers@yahoo.com>)
Ответы Re: why is bitmap index chosen for this query?
Список pgsql-performance
On Thu, May 18, 2006 at 08:52:04AM -0700, Stephen Byers wrote:
> Could someone explain the results of the following?

It sounds like PostgreSQL badly overestimates the cost of the index scan.
Does the table perchance fit completely into memory, without
effective_cache_size indicating that?

> Also, what is Recheck Cond?

The bitmap index scan will by default allocate one bit per tuple. If it can't
hold a complete bitmap of every tuple in memory, it will fall back to
allocating one bit per (8 kB) page, since it will have to read the entire
page anyhow, and the most dramatic cost is the seek. However, in the latter
case, it will also get a few extra records that don't match the original
clause, so it will have to recheck the condition ("Recheck Cond") before
outputting the tuples to the parent node.

/* Steinar */
--
Homepage: http://www.sesse.net/

В списке pgsql-performance по дате отправления:

Предыдущее
От: Stephen Byers
Дата:
Сообщение: why is bitmap index chosen for this query?
Следующее
От: "Ivan Zolotukhin"
Дата:
Сообщение: Re: SQL CPU time usage