1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Cache eval cost of qualification expressions in RestrictInfo nodes to

avoid repeated evaluations in cost_qual_eval().  This turns out to save
a useful fraction of planning time.  No change to external representation
of RestrictInfo --- although that node type doesn't appear in stored
rules anyway.
This commit is contained in:
Tom Lane
2000-12-12 23:33:34 +00:00
parent 77c443f8cd
commit 17b843d677
7 changed files with 54 additions and 24 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.100 2000/11/12 00:36:57 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.101 2000/12/12 23:33:33 tgl Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@ -1846,6 +1846,9 @@ _readRestrictInfo(void)
token = lsptok(NULL, &length); /* now read it */
local_node->hashjoinoperator = (Oid) atol(token);
/* eval_cost is not part of saved representation; compute on first use */
local_node->eval_cost = -1;
return local_node;
}