1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Fix performance problems with pg_index lookups (see, for example,

discussion of 5/19/00).  pg_index is now searched for indexes of a
relation using an indexscan.  Moreover, this is done once and cached
in the relcache entry for the relation, in the form of a list of OIDs
for the indexes.  This list is used by the parser and executor to drive
lookups in the pg_index syscache when they want to know the properties
of the indexes.  Net result: index information will be fully cached
for repetitive operations such as inserts.
This commit is contained in:
Tom Lane
2000-06-17 21:49:04 +00:00
parent 9cf80f2f55
commit d03a933ec5
13 changed files with 389 additions and 525 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: relcache.h,v 1.19 2000/01/31 04:35:57 tgl Exp $
* $Id: relcache.h,v 1.20 2000/06/17 21:49:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,13 +19,20 @@
/*
* relation lookup routines
*/
extern Relation RelationIdCacheGetRelation(Oid relationId);
extern Relation RelationIdGetRelation(Oid relationId);
extern Relation RelationNameGetRelation(const char *relationName);
/* finds an existing cache entry, but won't make a new one */
extern Relation RelationIdCacheGetRelation(Oid relationId);
extern void RelationClose(Relation relation);
extern void RelationForgetRelation(Oid rid);
/*
* Routines to compute/retrieve additional cached information
*/
extern List *RelationGetIndexList(Relation relation);
/*
* Routines for flushing/rebuilding relcache entries in various scenarios
*/