Re: [HACKERS] Fwd: Joins and links

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leon <leon(at)udmnet(dot)ru>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Fwd: Joins and links
Date: 1999-07-05 17:37:29
Message-ID: 21561.931196249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Leon <leon(at)udmnet(dot)ru> 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-07-05 18:00:12 Re: Re[2]: [GENERAL] Joins and links
Previous Message Leon 1999-07-05 17:22:05 Re[2]: [GENERAL] Joins and links