Re: Estimates on partial index - Mailing list pgsql-performance

From Victor Yegorov
Subject Re: Estimates on partial index
Date
Msg-id CAGnEboi9SS_DzHws1vy6mUOE+9YP+usEPVc-toOXNOX-o+sPLA@mail.gmail.com
Whole thread Raw
In response to Re: Estimates on partial index  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Estimates on partial index
List 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 by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Estimates on partial index
Next
From: Victor Yegorov
Date:
Subject: Re: Estimates on partial index