Re: OID Perfomance - Object-Relational databases

From: "Kevin Field" <kev(at)brantaero(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: OID Perfomance - Object-Relational databases
Date: 2006-11-23 14:58:50
Message-ID: 4565b72a.49710e4a.51dd.64f4@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everyone,

I just came across a thread in the pgsql archives from October 2000, and found this post particularly interesting:

http://archives.postgresql.org/pgsql-sql/2000-10/msg00044.php

...because I had already been designing something similar but on a larger scale, for an integrated information system with scheduling, accounting, internal messaging, inventory, safety management, and slew of other things. Initially when I read through the pgsql docs, I decided that I didn't ever want to deal with wraparound, and so I wouldn't use OIDs. But as I've been designing and implementing prototypes of this system, I've found it less than elegant to have universal references, because I always need to have a table name involved. Recently I clued in that OIDs could solve this, so I went looking through the archives and found that thread. I'm just wondering a few things.

First, how would Michael/Tom's suggestion (to have a single sequence used by multiple tables) work exactly, i.e., if I had a number from that sequence, how would I know which table it belonged to without checking *all* of the tables for a row with that ID number? Josh said he would try the idea and report back on performance...how did this all turn out?

If there's an answer to that question, then is it conceivable to use an int8 sequence across, say, 100 tables (which there may well be in the pool of things I would want to be able to arbitrarily reference by the time I'm done this project) as a substitute for OIDs until there are 64-bit OIDs?

Either way, are 64-bit OIDs planned within the next couple years? I could only find discussion on this from 2000, and the announcement that OIDs were optional after a certain version.

Thanks,
Kev

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-11-23 15:09:13 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Jorge Godoy 2006-11-23 14:40:33 Re: IS it a good practice to use SERIAL as Primary Key?