mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Tweak processing of multiple-index-scan plans to reduce overhead when
handling many-way scans: instead of re-evaluating all prior indexscan quals to see if a tuple has been fetched more than once, use a hash table indexed by tuple CTID. But fall back to the old way if the hash table grows to exceed SortMem.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: execnodes.h,v 1.104 2003/08/19 01:13:41 tgl Exp $
|
||||
* $Id: execnodes.h,v 1.105 2003/08/22 20:26:43 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -768,6 +768,8 @@ typedef ScanState SeqScanState;
|
||||
* RuntimeKeysReady true if runtime Skeys have been computed
|
||||
* RelationDescs ptr to array of relation descriptors
|
||||
* ScanDescs ptr to array of scan descriptors
|
||||
* DupHash hashtable for recognizing dups in multiple scan
|
||||
* MaxHash max # entries we will allow in hashtable
|
||||
* ----------------
|
||||
*/
|
||||
typedef struct IndexScanState
|
||||
@ -785,6 +787,8 @@ typedef struct IndexScanState
|
||||
bool iss_RuntimeKeysReady;
|
||||
RelationPtr iss_RelationDescs;
|
||||
IndexScanDescPtr iss_ScanDescs;
|
||||
HTAB *iss_DupHash;
|
||||
long iss_MaxHash;
|
||||
} IndexScanState;
|
||||
|
||||
/* ----------------
|
||||
|
Reference in New Issue
Block a user