Re: [HACKERS] Fwd: Joins and links
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Fwd: Joins and links |
Дата | |
Msg-id | 22416.931217780@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Fwd: Joins and links (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
Ответы |
Re: [HACKERS] Fwd: Joins and links
|
Список | pgsql-hackers |
Thomas Lockhart <lockhart@alumni.caltech.edu> writes: > Regardless of whether "there exist some real servers that offer such > features I am talking", a departure from the relation model in a > relational database is likely to lead to undesireable constraints and > restrictions in our future development. That was another thing that was bothering me about the idea of "version links" between tuples (as in Leon's second proposal). They don't fit into the fundamental relational model. I am not sure there's anything fundamentally wrong with his basic point; if, say, we could find a way to construct OIDs so that a tuple could be found very quickly from its OID, that wouldn't violate the relational model AFAICS, and such OIDs would work fine as "links". But I don't see any way to do that without either giving up UPDATE or introducing a huge amount of baggage into all processes that can update tables (VACUUM being the worst case, likely). Without doubt the best compromise would look remarkably like an index on OID. Ultimately, when you consider both the update costs and the access costs, I doubt that this sort of thing could be a win, except maybe in the case where the referenced table is hardly ever changed so that the update costs are seldom incurred. But in that situation it's not clear you want to store the referenced table in an RDBMS anyway --- there are lots of lower-overhead ways to deal with fixed tables, such as perfect-hash generators. > If they are a good idea, you might be able to implement and prove them > using an embedded language and the SPI facilities. I don't think VACUUM invokes triggers, so you couldn't really do anything about VACUUM rearranging the table under you that way, could you? I'll be interested to see Vadim's comments on this thread... regards, tom lane
В списке pgsql-hackers по дате отправления: