Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t17rQ-00EqBA-Ti for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Oct 2024 17:31:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t17rP-006nJf-8L for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Oct 2024 17:30:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t17rO-006nJJ-V8 for pgsql-hackers@lists.postgresql.org; Wed, 16 Oct 2024 17:30:59 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t17rM-001ONU-On for pgsql-hackers@postgresql.org; Wed, 16 Oct 2024 17:30:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=ARqSHEDtoWYhV2HRRviax3FJbY4qefHIITxXknm93wo=; b=UdatFuZoJ8G6NJSEA6wxlH+ZD9 Dl+ti4vpwFcRSbGCypwVN+llu+uTaZRsEqb1RxyFO++YhpJBApVC614Kg58OkBnO8j5kGFEdOLQT+ ZKOhkYqvdtyTLfuc5blKxEsLCfgfUcYb3nS+eY7G8BKInCdvG/7xXtqvKRauqrhxYCVcMjrDCEETO GHuNxqGVaXx4sROSHNH24USnR0/MGDGOP7FXbB4q4wuAW+tu7VIuE1sisRmpwIpl+HpsbxKjms9Kf 6M1VKbncrbhwwyeLMdtdcjJxHfJ+Bpb4bWlvjM7Jtnqqi1NGeZVQIfNnTCMMYIflZpMwzj64+rkoG CBXMBNNA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1t17rF-008sTV-2T; Wed, 16 Oct 2024 13:30:49 -0400 Date: Wed, 16 Oct 2024 13:30:49 -0400 From: Bruce Momjian To: Robert Haas Cc: bucoo , Tomas Vondra , pgsql-hackers , Tom Lane Subject: Re: optimize hashjoin Message-ID: References: <1724328492.62ed368fef9349e68728790d2af02e3f.bucoo@sohu.com> <1a55870e-f5f4-46ae-9676-00a2bbb7462e@vondra.me> <000001daf54b$f134e9a0$d39ebce0$@sohu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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=1075.213..9503.727 rows=47989007 loops=1) > > -> Hash Join (cost=508496.00..2302429.31 rows=47989008 width=0) (actual time=1087.588..8726.441 rows=47989007 loops=1) > > It's not a good idea to test performance with EXPLAIN ANALYZE, > generally speaking. And you usually need to test a few times and > average or something, rather than just a single test. But also, this > doesn't show the hash join being 10% faster. It shows the hash join > being essentially the same speed (1075ms unpatched, 1087ms patched), > and the aggregate node on top of it being faster. > > Now, it does seem possible to me that changing one node could cause a > performance improvement for the node above it, but I don't quite see > why that would happen in this case. Where are we on this patch? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?"