Re: Improved Cost Calculation for IndexOnlyScan

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improved Cost Calculation for IndexOnlyScan
Date: 2020-09-29 09:57:47
Message-ID: e1754f69-b975-8de6-1153-af5f3dfc3169@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-09-29 10:25:05 Re: OpenSSL 3.0.0 compatibility
Previous Message Surafel Temesgen 2020-09-29 09:54:52 Re: WIP: System Versioned Temporal Table