Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-10-01 Thread Michael Paquier
On Fri, Jul 27, 2018 at 02:19:27PM +0530, Ashutosh Bapat wrote: > [ removal of latest arguments ] > +1, if we could do that. The patch seems to have stuck a bit, so I am marking it as returned with feedback because of no activity. -- Michael signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-07-27 Thread Ashutosh Bapat
On Thu, Jul 26, 2018 at 10:30 PM, Dean Rasheed wrote: > On 26 July 2018 at 07:12, Ashutosh Bapat > wrote: >> In the patch clauselist_selectivity() gets called repeatedly for every >> new qual added to the clause list. Instead, if we try to combine the >> cost/row estimation with

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-07-26 Thread Dean Rasheed
On 26 July 2018 at 07:12, Ashutosh Bapat wrote: > In the patch clauselist_selectivity() gets called repeatedly for every > new qual added to the clause list. Instead, if we try to combine the > cost/row estimation with order_qual_clauses() or > clauselist_selectivity(), we might be able to what

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-07-26 Thread Ashutosh Bapat
On Mon, Jan 29, 2018 at 10:42 AM, Yuto Hayamizu wrote: > On Fri, Jan 19, 2018 at 5:07 PM, Yuto Hayamizu wrote: >> My idea of improving this patch is that give a threshold N_limit, >> and for q_1 ... q_N_limit, do the same weighted cost estimation in the >> current version of this patch. >> For

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-01-28 Thread Yuto Hayamizu
On Fri, Jan 19, 2018 at 5:07 PM, Yuto Hayamizu wrote: > My idea of improving this patch is that give a threshold N_limit, > and for q_1 ... q_N_limit, do the same weighted cost estimation in the > current version of this patch. > For q_{N_limit+1} , stop calling

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-01-19 Thread Yuto Hayamizu
On Thu, Nov 9, 2017 at 12:33 PM, Ashutosh Bapat wrote: > different set, within each set the order is same. FWIW, we can order > all clauses in largest set once and use that order every time. Albeit > we will have to remember the order somewhere OR make the

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-01-19 Thread Yuto Hayamizu
On Wed, Nov 8, 2017 at 6:48 AM, Tom Lane wrote: > Because (1) up to now there's been no need to consider the qual ordering > till later, and (2) re-doing that sort for each path seemed unduly > expensive. If we're to try to estimate whether later quals will be > reached, then

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-01-16 Thread Yuto Hayamizu
On Sun, Jan 7, 2018 at 8:25 AM, Stephen Frost wrote: > > Greetings, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: > > On Thu, Nov 9, 2017 at 12:33 PM, Ashutosh Bapat > > wrote: > > > Looking at order_qual_clauses(), we can say that

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-01-06 Thread Stephen Frost
Greetings, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Nov 9, 2017 at 12:33 PM, Ashutosh Bapat > wrote: > > Looking at order_qual_clauses(), we can say that a set of quals q1 > > qn are ordered the same irrespective of the set of clauses

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2017-11-29 Thread Michael Paquier
On Thu, Nov 9, 2017 at 12:33 PM, Ashutosh Bapat wrote: > Looking at order_qual_clauses(), we can say that a set of quals q1 > qn are ordered the same irrespective of the set of clauses they > are subset of. E.g. if {q1 .. qn} is subset of Q (ordered as Qo)