Re: Improved Cost Calculation for IndexOnlyScan - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Improved Cost Calculation for IndexOnlyScan
Date
Msg-id e1754f69-b975-8de6-1153-af5f3dfc3169@iki.fi
Whole thread Raw
In response to Re: Improved Cost Calculation for IndexOnlyScan  (Hamid Akhtar <hamid.akhtar@gmail.com>)
Responses Re: Improved Cost Calculation for IndexOnlyScan  (Hamid Akhtar <hamid.akhtar@gmail.com>)
List pgsql-hackers
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);
> ----
> 
> Does this make sense?

No. genericcostestimate() is only concerned with accesses to the index, 
not the the heap accesses that are needed with Index Scans. 'allvisfrac' 
should not affect the number of *index* pages fetched in any way.

- Heikki



pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: WIP: System Versioned Temporal Table
Next
From: Daniel Gustafsson
Date:
Subject: Re: OpenSSL 3.0.0 compatibility