Re: Improved Cost Calculation for IndexOnlyScan

2020-10-13 Thread Hamid Akhtar
On Mon, Oct 12, 2020 at 3:46 PM Hamid Akhtar wrote: > > > On Tue, Sep 29, 2020 at 2:57 PM Heikki Linnakangas > wrote: > >> On 29/09/2020 11:49, Hamid Akhtar wrote: >> > So, not actually random replacement here, rather a change with >> > baserel->allvisfrac taken into consideration (as given belo

Re: Improved Cost Calculation for IndexOnlyScan

2020-10-12 Thread Hamid Akhtar
On Tue, Sep 29, 2020 at 2:57 PM Heikki Linnakangas wrote: > On 29/09/2020 11:49, Hamid Akhtar wrote: > > So, not actually random replacement here, rather a change with > > baserel->allvisfrac taken into consideration (as given below): > > > > index_random_page_cost = Min(spc_seq_page_cost +

Re: Improved Cost Calculation for IndexOnlyScan

2020-09-29 Thread Heikki Linnakangas
On 29/09/2020 11:49, Hamid Akhtar wrote: So, not actually random replacement here, rather a change with baserel->allvisfrac taken into consideration (as given below): index_random_page_cost = Min(spc_seq_page_cost + spc_random_page_cost * (1.0 - baserel->allvisfrac), spc_random_page_cost);

Re: Improved Cost Calculation for IndexOnlyScan

2020-09-29 Thread Hamid Akhtar
On Tue, Sep 29, 2020 at 1:08 PM Heikki Linnakangas wrote: > On 29/09/2020 10:06, Hamid Akhtar wrote: > > In one of my earlier emails [1], I mentioned that there seems to be a > > problem with how the cost for index only scans is being calculated. > > [1] > > > https://www.postgresql.org/message-i

Re: Improved Cost Calculation for IndexOnlyScan

2020-09-29 Thread Heikki Linnakangas
On 29/09/2020 10:06, Hamid Akhtar wrote: In one of my earlier emails [1], I mentioned that there seems to be a problem with how the cost for index only scans is being calculated. [1] https://www.postgresql.org/message-id/CANugjhsnh0OBMOYc7qKcC%2BZsVvAXCeF7QiidLuFvg6zmHy1C7A%40mail.gmail.com My

Improved Cost Calculation for IndexOnlyScan

2020-09-29 Thread Hamid Akhtar
In one of my earlier emails [1], I mentioned that there seems to be a problem with how the cost for index only scans is being calculated. [1] https://www.postgresql.org/message-id/CANugjhsnh0OBMOYc7qKcC%2BZsVvAXCeF7QiidLuFvg6zmHy1C7A%40mail.gmail.com My concern is that there seems to be a bigger d