Cache the results of ri_FetchConstraintInfo in a backend-local cache.

Extracting data from pg_constraint turned out to take as much as 10% of the
runtime in a bulk-update case where the foreign key column wasn't changing,
because we did it over again for each tuple.  Fix that by maintaining a
backend-local cache of the results.  This is really a pretty small patch,
but converting the trigger functions to work with pointers rather than
local struct variables requires a lot of mechanical changes.
pull/3/head
Tom Lane 14 years ago
parent cfa0f4255b
commit 45ba424f33
  1. 548
      src/backend/utils/adt/ri_triggers.c

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save