From d03a933ec5400f77fc132d4a47bb7d2981ff5187 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 17 Jun 2000 21:49:04 +0000 Subject: 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. --- src/backend/executor/execMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/executor/execMain.c') diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 8fbb4be6cb0..f80fe9abab7 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -27,7 +27,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.117 2000/06/15 04:09:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.118 2000/06/17 21:48:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -735,7 +735,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate) */ if (resultRelationDesc->rd_rel->relhasindex && operation != CMD_DELETE) - ExecOpenIndices(resultRelationOid, resultRelationInfo); + ExecOpenIndices(resultRelationInfo); estate->es_result_relation_info = resultRelationInfo; } -- cgit v1.2.3