Re: Short-circuit sort_inner_and_outer if there are no mergejoin clauses

2024-04-26 Thread Richard Guo
On Thu, Apr 25, 2024 at 7:25 PM Ashutosh Bapat wrote: > Quickly looking at the function, the patch would make it more apparent > that the function is a noop when mergeclause_list is empty. > Thanks for looking at this patch. Yes, that's what it does. > I haven't looked closely to see if

Re: Short-circuit sort_inner_and_outer if there are no mergejoin clauses

2024-04-25 Thread Ashutosh Bapat
On Thu, Apr 25, 2024 at 12:50 PM Richard Guo wrote: > > On Wed, Apr 24, 2024 at 5:13 PM Richard Guo > wrote: > >> In sort_inner_and_outer, we create mergejoin join paths by explicitly >> sorting both relations on each possible ordering of the available >> mergejoin clauses. However, if there

Re: Short-circuit sort_inner_and_outer if there are no mergejoin clauses

2024-04-25 Thread Richard Guo
On Wed, Apr 24, 2024 at 5:13 PM Richard Guo wrote: > In sort_inner_and_outer, we create mergejoin join paths by explicitly > sorting both relations on each possible ordering of the available > mergejoin clauses. However, if there are no available mergejoin > clauses, we can skip this process

Short-circuit sort_inner_and_outer if there are no mergejoin clauses

2024-04-24 Thread Richard Guo
In sort_inner_and_outer, we create mergejoin join paths by explicitly sorting both relations on each possible ordering of the available mergejoin clauses. However, if there are no available mergejoin clauses, we can skip this process entirely. It seems that this is a relatively common scenario.