Re: [HACKERS] Fwd: Joins and links
От
Tom Lane
Тема
Re: [HACKERS] Fwd: Joins and links
Дата
Msg-id
21561.931196249@sss.pgh.pa.us
Ответ на
Fwd: Joins and links (Leon)
Список
Дерево обсуждения
Re[2]: [HACKERS] Fwd: Joins and links Leon <leon@udmnet.ru>
Leon writes: > We should make a real reference in one table to another! That > means there could be special data type called, say, "link", > which is a physical record number in the foreign table. There is no such thing as a physical record number for a tuple in Postgres. The closest you could come is an OID, which isn't really any faster than any other joinable field --- you still need an index to support fast lookup by OID. If we did have such a concept, the speed penalties for supporting hard links from one tuple to another would be enormous. Every time you change a tuple, you'd have to try to figure out what other tuples reference it, and update them all. Finally, I'm not convinced that the results would be materially faster than a standard mergejoin (assuming that you have indexes on both the fields being joined) or hashjoin (in the case that one table is small enough to be loaded into memory). regards, tom lane
В списке pgsql-hackers по дате отправления