Re: Partial join

2019-08-19 Thread Arne Roland
Richard Guo wrote: > Please refer to the code snippet below: > > @@ -1164,8 +1164,8 @@ generate_join_implied_equalities(PlannerInfo *root, > List *sublist = NIL; > > /* ECs containing consts do not need any further enforcement > */ > if (ec->e

Re: Partial join

2019-08-02 Thread Richard Guo
On Thu, Aug 1, 2019 at 7:46 PM Arne Roland wrote: > Hello Richard, > > thanks for your quick reply. > > > > We need to fix this. > > > Do you have a better idea than just keeping the old quals - possibly just > the ones that get eliminated - in a separate data structure? Is the push > down of qua

Re: Partial join

2019-08-02 Thread Richard Guo
On Thu, Aug 1, 2019 at 10:15 PM Tom Lane wrote: > Richard Guo writes: > > For the third query, a rough investigation shows that, the qual 'sl = > > 5' and 'sc.sl = sg.sl' will form an equivalence class and generate two > > implied equalities: 'sc.sl = 5' and 'sg.sl = 5', which can be pushed > >

Re: Partial join

2019-08-01 Thread Arne Roland
nes which happen before the restrict lists are generated? Regards Arne From: Richard Guo Sent: Thursday, August 1, 2019 1:14:44 PM To: Arne Roland Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Partial join On Thu, Aug 1, 2019 at 5:38 PM Arne Rol

Re: Partial join

2019-08-01 Thread Arne Roland
ning partitions should help in this case, since we are left with multiple partitions for both relations. Regards Arne From: Tom Lane Sent: Thursday, August 1, 2019 4:14:54 PM To: Richard Guo Cc: Arne Roland; pgsql-hackers@lists.postgresql.org Subject: Re: Partial

Re: Partial join

2019-08-01 Thread Tom Lane
Richard Guo writes: > For the third query, a rough investigation shows that, the qual 'sl = > 5' and 'sc.sl = sg.sl' will form an equivalence class and generate two > implied equalities: 'sc.sl = 5' and 'sg.sl = 5', which can be pushed > down to the base rels. One consequence of the deduction is

Re: Partial join

2019-08-01 Thread Richard Guo
On Thu, Aug 1, 2019 at 5:38 PM Arne Roland wrote: > Hello, > > I attached one example of a partitioned table with multi column partition > key. I also attached the output. > Disabling the hash_join is not really necessary, it just shows the more > drastic result in the case of low work_mem. > > C