diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-02-20 20:53:08 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-02-20 20:53:08 -0500 |
commit | affee8b14c68d8ac8815406be39a68403c4a815e (patch) | |
tree | 716b6760543219ce1f0890d48473b6ce47d0ac4c /src/backend/executor/nodeHash.c | |
parent | ddad002dea73cf2ad08b0916d4d9eb84fc18edad (diff) | |
download | postgresql-affee8b14c68d8ac8815406be39a68403c4a815e.tar.gz postgresql-affee8b14c68d8ac8815406be39a68403c4a815e.zip |
Speed up match_eclasses_to_foreign_key_col() when there are many ECs.
Check ec_relids before bothering to iterate through the EC members.
On a perhaps extreme, but still real-world, query in which
match_eclasses_to_foreign_key_col() accounts for the bulk of the
planner's runtime, this saves nearly 40% of the runtime. It's a bit
of a stopgap fix, but it's simple enough to be back-patched to 9.6
where this code came in; so let's do that.
David Rowley
Discussion: https://postgr.es/m/6970.1545327857@sss.pgh.pa.us
Diffstat (limited to 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions