Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9be7ea0

Browse files
committed
Remove unneeded indxqual field in IndexScanState, and the useless work
spent initializing it during indexscan startup.
1 parent303f464 commit9be7ea0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

‎src/backend/executor/nodeIndexscan.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.91 2004/02/03 17:34:02 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.92 2004/02/28 19:46:05 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -669,16 +669,19 @@ ExecInitIndexScan(IndexScan *node, EState *estate)
669669

670670
/*
671671
* initialize child expressions
672+
*
673+
* Note: we don't initialize all of the indxqual expression, only the
674+
* sub-parts corresponding to runtime keys (see below). The indxqualorig
675+
* expression is always initialized even though it will only be used in
676+
* some uncommon cases --- would be nice to improve that. (Problem is
677+
* that any SubPlans present in the expression must be found now...)
672678
*/
673679
indexstate->ss.ps.targetlist= (List*)
674680
ExecInitExpr((Expr*)node->scan.plan.targetlist,
675681
(PlanState*)indexstate);
676682
indexstate->ss.ps.qual= (List*)
677683
ExecInitExpr((Expr*)node->scan.plan.qual,
678684
(PlanState*)indexstate);
679-
indexstate->indxqual= (List*)
680-
ExecInitExpr((Expr*)node->indxqual,
681-
(PlanState*)indexstate);
682685
indexstate->indxqualorig= (List*)
683686
ExecInitExpr((Expr*)node->indxqualorig,
684687
(PlanState*)indexstate);

‎src/include/nodes/execnodes.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.111 2004/01/22 02:23:21 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.112 2004/02/28 19:46:06 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -765,8 +765,10 @@ typedef ScanState SeqScanState;
765765
/* ----------------
766766
* IndexScanState information
767767
*
768+
*indxqualorig execution state for indxqualorig expressions
768769
*NumIndices number of indices in this scan
769770
*IndexPtr current index in use
771+
*MarkIndexPtr IndexPtr for marked scan point
770772
*ScanKeys Skey structures to scan index rels
771773
*NumScanKeys array of no of keys in each Skey struct
772774
*RuntimeKeyInfo array of array of exprstates for Skeys
@@ -783,7 +785,6 @@ typedef ScanState SeqScanState;
783785
typedefstructIndexScanState
784786
{
785787
ScanStatess;/* its first field is NodeTag */
786-
List*indxqual;
787788
List*indxqualorig;
788789
intiss_NumIndices;
789790
intiss_IndexPtr;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp