Any way to favor index scans, but not bitmap index scans?

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Any way to favor index scans, but not bitmap index scans?
Дата
Msg-id 83b9a071e2eef2b05b6d505521605ae6@stringsutils.com
обсуждение исходный текст
Список pgsql-general
The data set I am working with has a very uneven distribution.

I had to to set random_page_cost = 0.75 to get good plans.
However, that first tries bitmap scans which perform very poorly.
Is there a way to have the planner to favor index scans and disfavor bitmap
scans? Is my best choice to just disable bitmap scans?

So far in this data set almost every time bitmap scans are used the queries
do worse, much worse. I had one extreme case where a sequential scan would
finish in 20 minutes and the same query using bitmap scans would take over
a day to finish.

My most recent test(before reducing random_page_cost)..
Sequential scan(default selected by planner): 12 minutes
Seq scan dissabled(bitmap index scans): 29.98 minutes
Seq scan disabled and bitmap index disabled: 3 seconds!

After I reduced random_page_cost and turned bitmap index off the planner is
picking up the right plan using an index scan. Now just testing more cases
to make sure the improvement is consistant for most of our queries.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

Предыдущее
От: Steve Martin
Дата:
Сообщение: Re: Substitute a variable in PL/PGSQL.
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: A couple of newbie questions ...