summaryrefslogtreecommitdiff
path: root/src/include/access/relscan.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-03-14 23:52:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-03-14 23:52:01 +0000
commit34235a295b307d3c50b2a74b20936f01b4ba76be (patch)
tree4accf8dd3e60c2cde3d3da5948e583c6d5cf921c /src/include/access/relscan.h
parent64568100787a5d03d036e70b32147385a35245e2 (diff)
Cache fmgr lookup data for index's getnext() function in IndexScanDesc,
so that the fmgr lookup only has to happen once per index scan and not once per tuple. Seems to save 5% or so of CPU time for an indexscan.
Diffstat (limited to 'src/include/access/relscan.h')
-rw-r--r--src/include/access/relscan.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index c3101bd92f6..19e4e28631d 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: relscan.h,v 1.18 2000/01/26 05:57:51 momjian Exp $
+ * $Id: relscan.h,v 1.19 2000/03/14 23:52:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,6 +54,7 @@ typedef struct IndexScanDescData
bool scanFromEnd; /* restart scan at end? */
uint16 numberOfKeys; /* number of key attributes */
ScanKey keyData; /* key descriptor */
+ FmgrInfo fn_getnext; /* cached lookup info for am's getnext fn */
} IndexScanDescData;
typedef IndexScanDescData *IndexScanDesc;