Re: index & Bitmap Heap Scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index & Bitmap Heap Scan
Дата
Msg-id 29055.1188320158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на index & Bitmap Heap Scan  (Paul <paul@wayr.org>)
Ответы Re: index & Bitmap Heap Scan  (Paul <paul@wayr.org>)
Список pgsql-performance
Paul <paul@wayr.org> writes:
> Why in the first case, pgsql uses the "better" index and if i search
> r_service instead of r_numero pgsql does a "Bitmap Heap scan" first ?

Given the difference in the number of rows to be fetched, both plan
choices look pretty reasonable to me.  If you want to experiment,
you can try forcing the other choice in each case (use enable_indexscan
and enable_bitmapscan) and see how fast it is, but I suspect the planner
got it right.

Beware of cache effects when trying two plans in quick succession ---
the second one might go faster just because all the data is already
swapped in.

            regards, tom lane

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

Предыдущее
От: Mark Lewis
Дата:
Сообщение: Re: Fwd: 8.2 Query 10 times slower than 8.1 (view-heavy)
Следующее
От: "Anton Melser"
Дата:
Сообщение: Re: Postgres performance problem