1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

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.
This commit is contained in:
Tom Lane
2000-03-14 23:52:01 +00:00
parent 6456810078
commit 34235a295b
3 changed files with 21 additions and 6 deletions

View File

@@ -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;