Re: Estimates on partial index

Поиск
Список
Период
Сортировка
От Victor Yegorov
Тема Re: Estimates on partial index
Дата
Msg-id CAGnEboi9SS_DzHws1vy6mUOE+9YP+usEPVc-toOXNOX-o+sPLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Estimates on partial index  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Estimates on partial index  (Victor Yegorov <vyegorov@gmail.com>)
Список pgsql-performance
2016-08-18 16:56 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
In that case you've got random_page_cost too far down.  Values less than
the default of 4 are generally only appropriate if the bulk of your
database stays in RAM.

Oh, that's interesting. I was under impression, that r_p_c reflects IO speed, like — make it smaller for SSDs.
To make this query prefer BitmapScan, I need to bump r_p_c to 5.8. And 6.0 makes it switch to SeqScan.

Does it means, that for huge DB (this one is ~1.5TB) it is better to increase r_p_c?

Still, this effect shows only for partial indexes, i.e. if I disable `idx_loan_agreemnets_loan_id_cond_is_current_true`,
than planner will not use any other and goes straight to SeqScan.
Does it means, that amount of table-related IO is not accounted for when planning scan over partial index?

--
Victor Y. Yegorov

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Estimates on partial index
Следующее
От: Victor Yegorov
Дата:
Сообщение: Re: Estimates on partial index