diff options
author | David Rowley <drowley@postgresql.org> | 2024-12-11 11:32:15 +1300 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2024-12-11 11:32:15 +1300 |
commit | 50416cc4843a85fcb53507e21577cce16c75c65f (patch) | |
tree | 3c05124ce367f78de9087584087c6b63b6845e3e /src/backend/executor/nodeSubplan.c | |
parent | 982890530379235974a7e99fd72e862ae40f1400 (diff) | |
download | postgresql-50416cc4843a85fcb53507e21577cce16c75c65f.tar.gz postgresql-50416cc4843a85fcb53507e21577cce16c75c65f.zip |
Speedup Hash Joins with dedicated functions for ExprState hashing
Hashing of a single Var is a very common operation for ExprState to
perform. Here we add dedicated ExecJust* functions which helps speed up
Hash Joins by removing the interpretation overhead in ExecInterpExpr().
This change currently only affects Hash Joins on a single column. Hash
Joins with multiple join keys or an expression still run through
ExecInterpExpr().
Some testing has shown up to 10% query performance increases on recent AMD
hardware and nearly 7% increase on an Apple M2 for a query performing a
hash join with a large number of lookups on a small hash table.
This change was extracted from a larger patch which adjusts GROUP BY /
hashed subplans / hashed set operations to use ExprState hashing.
Discussion: https://postgr.es/m/CAApHDvr8Zc0ZgzVoCZLdHGOFNhiJeQ6vrUcS9V7N23zMWQb-eA@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
0 files changed, 0 insertions, 0 deletions