Re: bitmaps and correlation - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: bitmaps and correlation
Date
Msg-id 20200113014752.GB26045@telsasoft.com
Whole thread Raw
In response to Re: bitmaps and correlation  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: bitmaps and correlation  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Mon, Jan 06, 2020 at 11:26:06PM -0600, Justin Pryzby wrote:
> As Jeff has pointed out, high correlation has two effects in cost_index():
> 1) the number of pages read will be less;
> 2) the pages will be read more sequentially;
> 
> cost_index reuses the pages_fetched variable, so (1) isn't particularly clear,

I tried to make this more clear in 0001

> +               cost_per_page_corr = spc_random_page_cost -
> +                       (spc_random_page_cost - spc_seq_page_cost)
> +                       * (1-correlation*correlation);

And fixed bug: this should be c*c not 1-c*c.

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: vacuum verbose detail logs are unclear; log at *start* of eachstage; show allvisible/frozen/hintbits
Next
From: Dilip Kumar
Date:
Subject: Re: Questions/Observations related to Gist vacuum