aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistvacuum.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-09-10 16:49:09 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-09-10 16:49:09 -0400
commit52c707483ce4d0161127e4958d981d1b5655865e (patch)
treeda3a53a752ef454c85de7f20b93babe45685f19a /src/backend/access/gist/gistvacuum.c
parentbccca780eef904002512a1a0b5ce617bcb63507b (diff)
downloadpostgresql-52c707483ce4d0161127e4958d981d1b5655865e.tar.gz
postgresql-52c707483ce4d0161127e4958d981d1b5655865e.zip
Use a hash table to de-duplicate column names in ruleutils.c.
Commit 8004953b5 added a hash table to avoid O(N^2) cost in choosing unique relation aliases while deparsing a view or rule. It did nothing about the similar O(N^2) (maybe worse) costs of choosing unique column aliases within each RTE. However, that's now demonstrably a bottleneck when deparsing CHECK constraints for wide tables, so let's use a similar hash table to handle those. The extra cost of setting up the hash table will not be repaid unless the table has many columns. I've set this up so that we use the brute force method if there are less than 32 columns. The exact cutoff is not too critical, but this value seems good because it results in both code paths getting exercised by existing regression-test cases. Patch by me; thanks to David Rowley for review. Discussion: https://postgr.es/m/2885468.1722291250@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/gist/gistvacuum.c')
0 files changed, 0 insertions, 0 deletions