Re: Idea how to get rid of Bitmap Heap Scan

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Idea how to get rid of Bitmap Heap Scan
Дата
Msg-id alpine.DEB.2.00.0912181548380.31626@aragorn.flymine.org
обсуждение исходный текст
Ответ на Idea how to get rid of Bitmap Heap Scan  ("Michael N. Mikhulya" <m.mikhulya@gmail.com>)
Ответы Re: Idea how to get rid of Bitmap Heap Scan
Список pgsql-performance
On Fri, 18 Dec 2009, Michael N. Mikhulya wrote:
> The problem here is that we are forced to fetch "files" in Bitmap Heap Scan.
> But actually there is no need for the whole "files" record. The
> necessary data is only "files" ids.
>
> The idea is to avoid fetching data from "files" table, and get the ids
> from index! (probably it is a little bit tricky, but it is a
> performance area...)

Unfortunately, the index does not contain enough information to accomplish
this. This is due to Postgres' advanced concurrency control system.
Postgres needs to fetch the actual rows from the files table in order to
check whether that row is visible in the current transaction, and a Bitmap
Index Scan is the fastest way to do this.

You can speed this up in Postgres 8.4 by having a RAID array and setting
the effective_concurrency configuration to the number of spindles in the
RAID array, or by having gobs of RAM and keeping everything in cache.

Matthew

--
 A good programmer is one who looks both ways before crossing a one-way street.
 Considering the quality and quantity of one-way streets in Cambridge, it
 should be no surprise that there are so many good programmers there.

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

Предыдущее
От: "Michael N. Mikhulya"
Дата:
Сообщение: Idea how to get rid of Bitmap Heap Scan
Следующее
От: Sigurgeir Gunnarsson
Дата:
Сообщение: Re: Issues with \copy from file