• Tom Lane's avatar
    Arrange to cache fmgr lookup information for an index's access method · 32e8fc4a
    Tom Lane authored
    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.
    32e8fc4a
rel.h 8.36 KB