Re: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)
Дата
Msg-id 15072.1151505444@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)  (Andrew Sagulin <andrews42@yandex.ru>)
Ответы Re: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-performance
Andrew Sagulin <andrews42@yandex.ru> writes:
> Does PostgreSQL's development team plan to revise the index scan
> cost algorithm or issues like mine is too rare for taking into account?

The algorithm is certainly open for discussion, but we're not changing
it on the basis of just a single report ...

You're mistaken to be fingering min_IO_cost as the source of the issue,
because there is also a correction for near-sequential access in
cost_bitmap_heap_scan.  If we were to bias the system as heavily against
the consideration as you propose, we would logically have to put a
similar bias into cost_bitmap_heap_scan, and you'd probably still end up
with a plain indexscan.  What you need to do is compare the two
functions and figure out what part of the cost models are out of line
with reality.  I tend to agree with the upthread comment that the
nonlinear interpolation between min_IO_cost and max_IO_cost is suspect
... but that may or may not have anything truly to do with your problem.
It might be that cost_index is fine and cost_bitmap_heap_scan is
overcharging.

BTW there are already some changes in HEAD relating to this, please see
the pghackers archives from beginning of June (thread "More thoughts
about planner's cost estimates").

            regards, tom lane

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

Предыдущее
От: Andrew Sagulin
Дата:
Сообщение: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Large index scan perfomance and indexCorrelation (PG 8.1.4 Win32)