pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Optimize grouping equality checks with virtual slots
Date: Thu, 19 Dec 2024 00:58:08 +0000
Message-ID: <E1tO4rg-000HH9-1V@gemulon.postgresql.org> (raw)

Optimize grouping equality checks with virtual slots

8f4ee9626 fixed an old Assert failure that could happen when the slot
type used to look up the hash table for BuildTupleHashTableExt() users
wasn't a TTSOpsMinimalTuple slot.  The fix for that in the back branches
had to be to pass the TupleTableSlotOps as NULL, however in master,
since we have the inputOps parameter as was added by d96d1d515, we can
pass that down instead.

At least one caller uses a fixed slot that's always TTSOpsVirtual, so
passing down inputOps for these cases allows ExecBuildGroupingEqual() to
skip adding the EEOP_INNER_FETCHSOME ExprEvalStep.

This should increase the performance of hashed subplans very slightly.

Author: Tom Lane, David Rowley
Discussion: https://postgr.es/m/2543667.1734483723@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/08cdb079d4a8a82c687321e9ffe0a3d3fbcc0551

Modified Files
--------------
src/backend/executor/execGrouping.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Message-ID: <E1tO4rg-000HH9-1V@gemulon.postgresql.org>
Permalink:  ../E1tO4rg-000HH9-1V@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tO4rg-000HH9-1V@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Optimize grouping equality checks with virtual slots
  In-Reply-To: <E1tO4rg-000HH9-1V@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox