aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-10-04 15:48:17 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-10-04 15:48:17 -0400
commitd73f4c74dd34b19c19839f7ae09fb96442728509 (patch)
treec90ec26d55c24bfca08d92cb6b43873cb64ae848 /src/include/parser
parent9ddef36278a9f676c07d0b4d9f33fa22e48ce3b5 (diff)
downloadpostgresql-d73f4c74dd34b19c19839f7ae09fb96442728509.tar.gz
postgresql-d73f4c74dd34b19c19839f7ae09fb96442728509.zip
In the executor, use an array of pointers to access the rangetable.
Instead of doing a lot of list_nth() accesses to es_range_table, create a flattened pointer array during executor startup and index into that to get at individual RangeTblEntrys. This eliminates one source of O(N^2) behavior with lots of partitions. (I'm not exactly convinced that it's the most important source, but it's an easy one to fix.) Amit Langote and David Rowley Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp
Diffstat (limited to 'src/include/parser')
-rw-r--r--src/include/parser/parsetree.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h
index dd9ae658ac7..fe16d7d1fa4 100644
--- a/src/include/parser/parsetree.h
+++ b/src/include/parser/parsetree.h
@@ -32,16 +32,6 @@
((RangeTblEntry *) list_nth(rangetable, (rangetable_index)-1))
/*
- * getrelid
- *
- * Given the range index of a relation, return the corresponding
- * relation OID. Note that InvalidOid will be returned if the
- * RTE is for a non-relation-type RTE.
- */
-#define getrelid(rangeindex,rangetable) \
- (rt_fetch(rangeindex, rangetable)->relid)
-
-/*
* Given an RTE and an attribute number, return the appropriate
* variable name or alias for that attribute of that RTE.
*/