]> granicus.if.org Git - postgresql/commit
Arrange to cache fmgr lookup information for an index's access method
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 May 2005 23:31:21 +0000 (23:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 May 2005 23:31:21 +0000 (23:31 +0000)
commit32e8fc4a28dd718aef16b9f617602c88b1f5f7e1
tree7132d4430bebde31955c392787c1a7b829b0d023
parentdd67cf365a76ee875d7bc3aa3788a243fce4776f
Arrange to cache fmgr lookup information for an index's access method
routines in the index's relcache entry, instead of doing a fresh fmgr_info
on every index access.  We were already doing this for the index's opclass
support functions; not sure why we didn't think to do it for the AM
functions too.  This supersedes the former method of caching (only)
amgettuple in indexscan scan descriptors; it's an improvement because the
function lookup can be amortized across multiple statements instead of
being repeated for each statement.  Even though lookup for builtin
functions is pretty cheap, this seems to drop a percent or two off some
simple benchmarks.
src/backend/access/index/genam.c
src/backend/access/index/indexam.c
src/backend/utils/cache/relcache.c
src/include/access/genam.h
src/include/access/relscan.h
src/include/utils/rel.h