Re: [HACKERS] Fwd: Joins and links - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Fwd: Joins and links
Date
Msg-id Pine.LNX.4.10.9907061804550.518-100000@saxony.pathwaynet.com
Whole thread Raw
In response to Re: [HACKERS] Fwd: Joins and links  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 5 Jul 1999, Tom Lane wrote:

> 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.

So is there anything wrong with that?

> 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.

While I read this thread I noticed that a lot of people are concerned
about their update speeds. I am primarily concerned about query speeds.
Consider how often you update data vs. how often you query it. That's the
whole point of a database: to optimize information retrieval. Now I am not
sure how big those update performance penalties would be but I am not
concerned really.

Meanwhile I agree that hard-linking via record IDs sounds suspiciously
like a page from the OODB textbook where it is praised for exactly the
same reasons the person who started this discussion cited: no joins. But
in order for that to work (if it works) the database software would have
to be written from scratch in otder for it to be marginally efficient.

The question I ask myself though is, are there any concrete plans for
referential integrity via foreign key clauses? 6.6, 7.0, never? To me,
that's really much more important than query speed or MVCC.

-- 
Peter Eisentraut
PathWay Computing, Inc.



pgsql-hackers by date:

Previous
From: Ryan Bradetich
Date:
Subject: Re: [HACKERS] alter table
Next
From: Hannu Krosing
Date:
Subject: Re: [HACKERS] Fwd: Joins and links