1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Adjust nodeBitmapIndexscan to keep the target index opened from plan

startup to end, rather than re-opening it in each MultiExecBitmapIndexScan
call.  I had foolishly thought that opening/closing wouldn't be much
more expensive than a rescan call, but that was sheer brain fade.

This seems to fix about half of the performance lossage reported by
Sergey Koposov.  I'm still not sure where the other half went.
This commit is contained in:
Tom Lane
2005-05-05 03:37:23 +00:00
parent e6e7e64345
commit db70a31294
2 changed files with 48 additions and 30 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.130 2005/04/28 21:47:17 tgl Exp $
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.131 2005/05/05 03:37:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -897,6 +897,8 @@ typedef struct IndexScanState
* that will be evaluated at runtime
* RuntimeContext expr context for evaling runtime Skeys
* RuntimeKeysReady true if runtime Skeys have been computed
* RelationDesc index relation descriptor
* ScanDesc index scan descriptor
* ----------------
*/
typedef struct BitmapIndexScanState
@ -908,6 +910,8 @@ typedef struct BitmapIndexScanState
ExprState **biss_RuntimeKeyInfo;
ExprContext *biss_RuntimeContext;
bool biss_RuntimeKeysReady;
Relation biss_RelationDesc;
IndexScanDesc biss_ScanDesc;
} BitmapIndexScanState;
/* ----------------