aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-13 00:20:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-13 00:20:45 +0000
commite7d8bfb9342622971cfb326672c998934433546a (patch)
tree08d4b5b6d63fd1ea562b34892dff1e29194cd713 /src/backend/access/gist/gist.c
parentfdf8d0624a9881e8ff6efcd60e20290291cc4c6c (diff)
downloadpostgresql-e7d8bfb9342622971cfb326672c998934433546a.tar.gz
postgresql-e7d8bfb9342622971cfb326672c998934433546a.zip
Arrange to cache the results of looking up a btree predicate proof comparison
operator. The result depends only on the two input operators and the proof direction (imply or refute), so it's easy to cache. This provides a very large savings in cases such as Sergey Konoplev's long NOT-IN-list example, where predtest spends all its time repeatedly figuring out that the same pair of operators cannot be used to prove anything. (But of course the O(N^2) behavior still catches up with you eventually.) I'm not convinced it buys a whole lot when constraint_exclusion isn't turned on, but it's not a lot of added code so we might as well cache all the time.
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions