mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Some further performance tweaks for planning large inheritance trees that
are mostly excluded by constraints: do the CE test a bit earlier to save some adjust_appendrel_attrs() work on excluded children, and arrange to use array indexing rather than rt_fetch() to fetch RTEs in the main body of the planner. The latter is something I'd wanted to do for awhile anyway, but seeing list_nth_cell() as 35% of the runtime gets one's attention.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.232 2007/04/06 22:33:42 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.233 2007/04/21 21:01:45 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3487,7 +3487,7 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
|
||||
vardata->atttype = var->vartype;
|
||||
vardata->atttypmod = var->vartypmod;
|
||||
|
||||
rte = rt_fetch(var->varno, root->parse->rtable);
|
||||
rte = root->simple_rte_array[var->varno];
|
||||
|
||||
if (rte->inh)
|
||||
{
|
||||
|
Reference in New Issue
Block a user