1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Second thoughts dept: arrange to cache mergejoin scan selectivity

in RestrictInfo nodes, instead of recomputing on every use.
This commit is contained in:
Tom Lane
2002-03-01 06:01:20 +00:00
parent f8c109528c
commit 8f0a9e85b3
6 changed files with 34 additions and 13 deletions

View File

@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.163 2002/02/26 22:47:05 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.164 2002/03/01 06:01:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1406,6 +1406,8 @@ _copyRestrictInfo(RestrictInfo *from)
*/
newnode->left_pathkey = NIL;
newnode->right_pathkey = NIL;
newnode->left_mergescansel = from->left_mergescansel;
newnode->right_mergescansel = from->right_mergescansel;
newnode->hashjoinoperator = from->hashjoinoperator;
newnode->left_bucketsize = from->left_bucketsize;
newnode->right_bucketsize = from->right_bucketsize;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.114 2002/02/26 22:47:07 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.115 2002/03/01 06:01:18 tgl Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -1846,9 +1846,11 @@ _readRestrictInfo(void)
local_node->eval_cost = -1;
/* ditto for this_selec */
local_node->this_selec = -1;
/* ditto for cached pathkeys and bucketsize */
/* ditto for cached pathkeys, selectivity, bucketsize */
local_node->left_pathkey = NIL;
local_node->right_pathkey = NIL;
local_node->left_mergescansel = -1;
local_node->right_mergescansel = -1;
local_node->left_bucketsize = -1;
local_node->right_bucketsize = -1;