| From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
|---|---|
| To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: bitmaps and correlation |
| Date: | 2020-01-13 01:47:53 |
| Message-ID: | 20200113014752.GB26045@telsasoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| v4-0001-Make-more-clear-the-computation-of-min-max-IO.patch | text/x-diff | 5.3 KB |
| v4-0002-Use-correlation-statistic-in-costing-bitmap-scans.patch | text/x-diff | 24.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dilip Kumar | 2020-01-13 03:25:57 | Re: Questions/Observations related to Gist vacuum |
| Previous Message | Justin Pryzby | 2020-01-13 00:45:43 | Re: vacuum verbose detail logs are unclear; log at *start* of each stage; show allvisible/frozen/hintbits |