Re: bitmaps and correlation

2021-02-01 Thread Masahiko Sawada
On Thu, Jan 28, 2021 at 9:51 PM Masahiko Sawada wrote: > > On Sat, Nov 28, 2020 at 5:49 AM Tom Lane wrote: > > > > Heikki Linnakangas writes: > > > Other than that, and a quick pgdindent run, this seems ready to me. I'll > > > mark it as Ready for Committer. > > > > I dunno, this seems largely

Re: bitmaps and correlation

2021-01-28 Thread Masahiko Sawada
On Sat, Nov 28, 2020 at 5:49 AM Tom Lane wrote: > > Heikki Linnakangas writes: > > Other than that, and a quick pgdindent run, this seems ready to me. I'll > > mark it as Ready for Committer. > > I dunno, this seems largely misguided to me. > > It's already the case that index correlation is

Re: bitmaps and correlation

2020-11-27 Thread Tom Lane
Heikki Linnakangas writes: > Other than that, and a quick pgdindent run, this seems ready to me. I'll > mark it as Ready for Committer. I dunno, this seems largely misguided to me. It's already the case that index correlation is just not the right stat for this purpose, since it doesn't give

Re: bitmaps and correlation

2020-11-27 Thread Heikki Linnakangas
On 06/11/2020 19:57, Justin Pryzby wrote: On Fri, Nov 06, 2020 at 01:51:26PM +, Anastasia Lubennikova wrote: The first patch is simply a refactoring and don't see any possible objections against it. The second patch also looks fine to me. The logic is understandable and the code is neat.

Re: bitmaps and correlation

2020-11-06 Thread Justin Pryzby
On Fri, Nov 06, 2020 at 01:51:26PM +, Anastasia Lubennikova wrote: > I wonder why this patch hangs so long without a review. Maybe it will help to > move discussion forward, if you provide more examples of queries that can > benefit from this imporovement? Thanks for looking. The

Re: bitmaps and correlation

2020-11-06 Thread Anastasia Lubennikova
Status update for a commitfest entry According to cfbot, the patch fails to apply. Could you please send a rebased version? I wonder why this patch hangs so long without a review. Maybe it will help to move discussion forward, if you provide more examples of queries that can benefit from

Re: bitmaps and correlation

2020-03-13 Thread Justin Pryzby
There were no comments last month, so rebased, fixed tests, and kicked to next CF. -- Justin >From e754a93aff10cb435f5ecef923a810b9edc02d68 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 8 Jan 2020 19:23:51 -0600 Subject: [PATCH v5 1/2] Make more clear the computation of min/max IO..

Re: bitmaps and correlation

2020-01-12 Thread Justin Pryzby
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

Re: bitmaps and correlation

2020-01-06 Thread Justin Pryzby
On Tue, Jan 07, 2020 at 09:21:03AM +0530, Dilip Kumar wrote: > On Tue, Jan 7, 2020 at 1:29 AM Justin Pryzby wrote: > > > > Find attached cleaned up patch. > > For now, I updated the regress/expected/, but I think the test maybe has to > > be > > updated to do what it was written to do. > > I

Re: bitmaps and correlation

2020-01-06 Thread Dilip Kumar
On Tue, Jan 7, 2020 at 1:29 AM Justin Pryzby wrote: > > Find attached cleaned up patch. > For now, I updated the regress/expected/, but I think the test maybe has to be > updated to do what it was written to do. I have noticed that in "cost_index" we have used the indexCorrelation for computing

Re: bitmaps and correlation

2020-01-06 Thread Justin Pryzby
Find attached cleaned up patch. For now, I updated the regress/expected/, but I think the test maybe has to be updated to do what it was written to do. >From 36f547d69b8fee25869d6ef3ef26d327a8ba1205 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 1 Jan 2019 16:17:28 -0600 Subject: [PATCH

Re: bitmaps and correlation

2019-12-01 Thread Justin Pryzby
On Sun, Dec 01, 2019 at 12:34:37PM +0900, Michael Paquier wrote: > On Sat, Nov 02, 2019 at 03:26:17PM -0500, Justin Pryzby wrote: > > Attached is a fixed and rebasified patch for cfbot. > > Included inline for conceptual review. > > Your patch still causes two regression tests to fail per Mr

Re: bitmaps and correlation

2019-11-30 Thread Michael Paquier
On Sat, Nov 02, 2019 at 03:26:17PM -0500, Justin Pryzby wrote: > Attached is a fixed and rebasified patch for cfbot. > Included inline for conceptual review. Your patch still causes two regression tests to fail per Mr Robot's report: join and select. Could you look at those problems? I have

Re: bitmaps and correlation

2019-11-02 Thread Justin Pryzby
Attached is a fixed and rebasified patch for cfbot. Included inline for conceptual review. >From f3055a5696924427dda280da702c41d2d2796a24 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 1 Jan 2019 16:17:28 -0600 Subject: [PATCH v2] Use correlation statistic in costing bitmap scans..

Re: bitmaps and correlation

2019-01-01 Thread Justin Pryzby
Attached for real. diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 88780c0..1c25f36 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -548,11 +548,12 @@ cost_index(IndexPath *path, PlannerInfo *root,

bitmaps and correlation

2019-01-01 Thread Justin Pryzby
It's a new year and I'm getting reflective, so resuming a portion of conversation we had here: https://www.postgresql.org/message-id/CAMkU%3D1yVbwEAugaCmKWxjaX15ZduWee45%2B_DqCw--d_3N_O_%3DQ%40mail.gmail.com Find attached patch which implements use of correlation statistic in costing for bitmap