469,271 Members | 895 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

What is an RT index?

Hi, could you help me? I am reading documentation on RelOptInfo in version
7.3.4 and have come across "RT indexes" in the explanation. Could you tell
me what they are? They are mentioned in file src/include/nodes/relation.h in
version 7.3.4. They seem to be some kind of unique identifiers of relations,
but I have not been able to find a reference to them in PostgreSQL
documentation.

Many thanks,

Rada
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #1
1 1457
"Rada Chirkova" <ch******@csc.ncsu.edu> writes:
Hi, could you help me? I am reading documentation on RelOptInfo in version
7.3.4 and have come across "RT indexes" in the explanation. Could you tell
me what they are?
"rangetable indexes", that is, the integer position numbers of different
relations' entries in the Query's rtable list.
They seem to be some kind of unique identifiers of relations,


Unique only within the context of a given query. For example,

select * from a join b on (a.f1 = b.f2)

will create RTEs (range table entries, struct RangeTblEntry) for
a, b, and their join. Because the RTEs will be added to the rtable list
in that order, they will have RT indexes 1, 2, 3 respectively in this
query.

There are various places in the optimizer code that use "relid" to mean
the same thing as "RT index". Outside the optimizer, "relid" more often
means a relation's OID, which is not the same thing at all.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ravi Tallury | last post: by
7 posts views Thread by robertbrown1971 | last post: by
43 posts views Thread by Mountain Bikn' Guy | last post: by
3 posts views Thread by chutsu | last post: by
89 posts views Thread by Tubular Technician | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.