Re: Improve selectivity estimate for range queries

2019-01-24 Thread Kyotaro HORIGUCHI
Hi. At Fri, 11 Jan 2019 11:36:47 +0900, "Yuzuko Hosoya" wrote in <01d4a956$806a2ab0$813e8010$@lab.ntt.co.jp> > Hi, > > Thanks for the comments, and I'm sorry for the late reply. > > > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > > Sent: Friday, January 11, 2019 7:04 AM > > > Robert Haas

RE: Improve selectivity estimate for range queries

2019-01-10 Thread Yuzuko Hosoya
Hi, Thanks for the comments, and I'm sorry for the late reply. > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Friday, January 11, 2019 7:04 AM > > Robert Haas writes: > > On Fri, Dec 21, 2018 at 11:50 AM Tom Lane wrote: > >> A smaller-footprint way to fix the immediate problem might be to

Re: Improve selectivity estimate for range queries

2019-01-10 Thread Tom Lane
Robert Haas writes: > On Fri, Dec 21, 2018 at 11:50 AM Tom Lane wrote: >> A smaller-footprint way to fix the immediate problem might be to >> change the values of DEFAULT_INEQ_SEL and friends so that they're >> even less likely to be matched by accident. That is, instead of >> 0.

Re: Improve selectivity estimate for range queries

2019-01-10 Thread Robert Haas
On Fri, Dec 21, 2018 at 11:50 AM Tom Lane wrote: > A smaller-footprint way to fix the immediate problem might be to > change the values of DEFAULT_INEQ_SEL and friends so that they're > even less likely to be matched by accident. That is, instead of > 0., use 0.342 or

Re: Improve selectivity estimate for range queries

2019-01-08 Thread Kyotaro HORIGUCHI
At Tue, 08 Jan 2019 16:26:38 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20190108.162638.106314087.horiguchi.kyot...@lab.ntt.co.jp> > Hello. > > At Fri, 21 Dec 2018 11:50:28 -0500, Tom Lane wrote in > <28533.1545411...@sss.pgh.pa.us> > > seem that that's just moving the problem a

Re: Improve selectivity estimate for range queries

2019-01-08 Thread Kyotaro HORIGUCHI
Sigh.. In the frrst place, the loop should not stop until the maximum exponent. sorry, but I don't have a time now.. 2019年1月8日(火) 16:43 Kyotaro HORIGUCHI : > Mmm. > > At Tue, 08 Jan 2019 16:26:38 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < > 20190108.162638.106314087.horiguchi.ky

Re: Improve selectivity estimate for range queries

2019-01-07 Thread Kyotaro HORIGUCHI
Mmm. At Tue, 08 Jan 2019 16:26:38 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20190108.162638.106314087.horiguchi.kyot...@lab.ntt.co.jp> > FWIW, I got the following result on my environment. It seems > different enough if this holds on all supported platforms, though > there still

Re: Improve selectivity estimate for range queries

2019-01-07 Thread Kyotaro HORIGUCHI
Hello. At Fri, 21 Dec 2018 11:50:28 -0500, Tom Lane wrote in <28533.1545411...@sss.pgh.pa.us> > "Yuzuko Hosoya" writes: > > From: Kyotaro HORIGUCHI [mailto:horiguchi.kyot...@lab.ntt.co.jp] > >> At Thu, 20 Dec 2018 17:21:29 +0900, "Yuzuko Hosoya" > >> wrote in > >> <008701d4983d$02e731c0$08b59

Re: Improve selectivity estimate for range queries

2018-12-21 Thread Tom Lane
"Yuzuko Hosoya" writes: > From: Kyotaro HORIGUCHI [mailto:horiguchi.kyot...@lab.ntt.co.jp] >> At Thu, 20 Dec 2018 17:21:29 +0900, "Yuzuko Hosoya" >> wrote in >> <008701d4983d$02e731c0$08b59540$@lab.ntt.co.jp> >>> To handle such cases I've thought up of an idea based on a previous >>> commit[1] w

RE: Improve selectivity estimate for range queries

2018-12-21 Thread Yuzuko Hosoya
Hi, Thanks for the comments. I attach the v2 patch. > From: Kyotaro HORIGUCHI [mailto:horiguchi.kyot...@lab.ntt.co.jp] > Sent: Friday, December 21, 2018 12:25 PM > > Hello. > > At Thu, 20 Dec 2018 17:21:29 +0900, "Yuzuko Hosoya" > wrote in > <008701d4983d$02e731c0$08b59540$@lab.ntt.co.jp> > >

Re: Improve selectivity estimate for range queries

2018-12-20 Thread Kyotaro HORIGUCHI
Hello. At Thu, 20 Dec 2018 17:21:29 +0900, "Yuzuko Hosoya" wrote in <008701d4983d$02e731c0$08b59540$@lab.ntt.co.jp> > In my environment, the selectivity for id > 0 was 0.1, > and the selectivity for id < 1 was 0.1. Then, the > value of rqlist->hibound and rql