Re: optimize hashjoin

2024-10-16 Thread Bruce Momjian
On Fri, Aug 23, 2024 at 08:17:26AM -0400, Robert Haas wrote: > On Fri, Aug 23, 2024 at 7:02 AM bucoo wrote: > > Howerver, the non-parallel hashjoin indeed showed about a 10% performance > > improvement. > >-> Hash Join (cost=508496.00..2302429.31 rows=47989008 width=0) > > (actual time=107

Re: optimize hashjoin

2024-08-23 Thread Robert Haas
On Fri, Aug 23, 2024 at 7:02 AM bucoo wrote: > Howerver, the non-parallel hashjoin indeed showed about a 10% performance > improvement. >-> Hash Join (cost=508496.00..2302429.31 rows=47989008 width=0) (actual > time=1075.213..9503.727 rows=47989007 loops=1) >-> Hash Join (cost=508496

Re: optimize hashjoin

2024-08-22 Thread Tomas Vondra
Hi, It seems you responded by writing a new message and just copying the subject, which unfortunately doesn't set the headers used for threading (e.g. in archives). Please just respond to the message. Or maybe your client does not set the References/In-Reply-To headers correctly. Not sure which m

Re: optimize hashjoin

2024-08-22 Thread Kirill Reshke
On Thu, 22 Aug 2024 at 17:08, bucoo wrote: > > > 0) The patch does not apply anymore, thanks to David committing a patch > > > yesterday. Attached is a patch rebased on top of current master. > > That patch is based on PG17. I have now rewritten it based on the master > branch and added some comm

Re: optimize hashjoin

2024-08-22 Thread bucoo
> 0) The patch does not apply anymore, thanks to David committing a patch> yesterday. Attached is a patch rebased on top of current master.That patch is based on PG17. I have now rewritten it based on the master branch and added some comments.> 1) Wouldn't it be easier (and just as efficient) to us

Re: optimize hashjoin

2024-08-21 Thread Tomas Vondra
On Aug 21, 2024 19:17, Robert Haas wrote:On Wed, Aug 21, 2024 at 12:31 PM Tomas Vondra wrote: > Anyway, I took a look and the basic idea is simple - when shuffling > tuples between batches in a hash join, we're currently deforming the > tuple (->slot) we just read from a batch, only to immedia

Re: optimize hashjoin

2024-08-21 Thread Robert Haas
On Wed, Aug 21, 2024 at 12:31 PM Tomas Vondra wrote: > Anyway, I took a look and the basic idea is simple - when shuffling > tuples between batches in a hash join, we're currently deforming the > tuple (->slot) we just read from a batch, only to immediately form it > (slot->) again and write it to

Re: optimize hashjoin

2024-08-21 Thread Tomas Vondra
Hi, On 8/21/24 03:49, bucoo wrote: > Avoid unnecessary form and deform tuple. > Thanks for the patch. Generally speaking, it's usually a good idea to briefly explain what the patch does, why is that beneficial, in what circumstances, etc. It's sometimes not quite obvious from the patch itself (e