Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2024-07-08 Thread Andrei Lepikhov
On 3/11/2023 23:43, Tomas Vondra wrote: On 9/11/23 10:04, Lepikhov Andrei wrote: * Determine bucketsize fraction and MCV frequency for the inner * relation. We use the smallest bucketsize or MCV frequency estimated * for any individual hashclause; this is undoubtedly conservative. I'm

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2023-11-03 Thread Tomas Vondra
On 9/11/23 10:04, Lepikhov Andrei wrote: > > > On Mon, Sep 11, 2023, at 11:51 AM, Andy Fan wrote: >> Hi, >> >> On Thu, Jun 15, 2023 at 4:30 PM Andrey Lepikhov >> wrote: >>> Hi, all. >>> >>> Some of my clients use JOIN's with three - four clauses. Quite >>> frequently, I see complaints on

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2023-09-11 Thread Lepikhov Andrei
On Mon, Sep 11, 2023, at 11:51 AM, Andy Fan wrote: > Hi, > > On Thu, Jun 15, 2023 at 4:30 PM Andrey Lepikhov > wrote: >> Hi, all. >> >> Some of my clients use JOIN's with three - four clauses. Quite >> frequently, I see complaints on unreasonable switch of JOIN algorithm to >> Merge Join

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2023-09-10 Thread Andy Fan
Hi, On Thu, Jun 15, 2023 at 4:30 PM Andrey Lepikhov wrote: > Hi, all. > > Some of my clients use JOIN's with three - four clauses. Quite > frequently, I see complaints on unreasonable switch of JOIN algorithm to > Merge Join instead of Hash Join. Quick research have shown one weak > place -

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2023-09-07 Thread Bruce Momjian
Does anyone else have an opinion on this patch? It looks promising. --- On Wed, Jun 28, 2023 at 04:53:06PM +0300, Alena Rybakina wrote: > Hi! > > On 15.06.2023 11:30, Andrey Lepikhov wrote: > > Hi, all. > >

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2023-06-28 Thread Alena Rybakina
Hi! On 15.06.2023 11:30, Andrey Lepikhov wrote: Hi, all. Some of my clients use JOIN's with three - four clauses. Quite frequently, I see complaints on unreasonable switch of JOIN algorithm to Merge Join instead of Hash Join. Quick research have shown one weak place - estimation of an

MergeJoin beats HashJoin in the case of multiple hash clauses

2023-06-15 Thread Andrey Lepikhov
Hi, all. Some of my clients use JOIN's with three - four clauses. Quite frequently, I see complaints on unreasonable switch of JOIN algorithm to Merge Join instead of Hash Join. Quick research have shown one weak place - estimation of an average bucket size in final_cost_hashjoin (see q2.sql