Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id ED1116331DC for ; Thu, 2 Apr 2009 17:32:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 82649-03 for ; Thu, 2 Apr 2009 17:32:02 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id 231E9632F09 for ; Thu, 2 Apr 2009 17:32:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail129162.authsmtp.net (outmail129162.authsmtp.net [62.13.129.162]) by mx3.hub.org (Postfix) with ESMTP id 0F40D37B7F1 for ; Thu, 2 Apr 2009 17:32:05 -0300 (ADT) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id n32KW1gw005939; Thu, 2 Apr 2009 21:32:01 +0100 (BST) Received: from [192.168.0.4] (85-211-223-92.dyn.gotadsl.co.uk [85.211.223.92]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id n32KVxPw000576; Thu, 2 Apr 2009 21:31:59 +0100 (BST) Subject: Re: [COMMITTERS] pgsql: If we expect a hash join to be performed in multiple batches, From: Simon Riggs To: Tom Lane Cc: pgsql-hackers@postgresql.org In-Reply-To: <20202.1238701799@sss.pgh.pa.us> References: <20090326171535.6B9BF754ADE@cvs.postgresql.org> <1238692283.5444.123.camel@ebony.2ndQuadrant> <20202.1238701799@sss.pgh.pa.us> Content-Type: text/plain Date: Thu, 02 Apr 2009 21:32:56 +0100 Message-Id: <1238704376.5444.142.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 5104a3b0-1fc5-11de-8a51-002264978518 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAdbbElD HGQLW11EUlx7WmJ/ bgMfZQBDYEtPQQdo U1ZAQE1QEQdtHhxP WB0cKX86F0JGeH51 YkAsX3JeVQp/dEZ5 E00GFXAHMzRldWEe BBVFf1JRcR5Kfh1H bFR2U3sIYG1JBC9q VzwYGBUUHAljBR5u d0kVIkkLRRRDPzB0 WB1KECU3EEYZDyx7 LxU9KhYeG0cXelk1 eVEsEUoVKREVEAhT EyMsASkRIkQFWysz CQ4SV0cCGz1QWmM0 X-Authentic-SMTP: 61633235383639.pelican.dmpriest.net.uk:1378/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200904/145 X-Sequence-Number: 136248 On Thu, 2009-04-02 at 15:49 -0400, Tom Lane wrote: > Simon Riggs writes: > > Can we add "batches=N" to the EXPLAIN output for Hash and/or Hash Join? > > Are you talking about expected batches, or actual batches? Expected batches for EXPLAIN, both for EXPLAIN ANALYZE. > If the > former, would it be sufficient to distinguish "1" from "more than 1"? > If so, maybe changing the node title to "Batched Hash" would do. Hmmm, knowing the number of batches is beneficial since it helps you to calculate the required memory to get best performance. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support