Re: OID Perfomance - Object-Relational databases - Mailing list pgsql-sql

From Jeff MacDonald
Subject Re: OID Perfomance - Object-Relational databases
Date
Msg-id Pine.BSF.4.21.0010032334080.24435-100000@rage.hub.org
Whole thread Raw
In response to OID Perfomance - Object-Relational databases  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Hi Josh,

I didn't get right tho this, because well.. you asked
the list, i figured i'd give them a chance first. and they've
answered the same as i would have..

>     Because it's a very elegant solution to my database structure issues,
> I'm using OID's extensively as referents and foriegn keys.  However, I
> wanted to see if others had previous experience in this (answer as many
> as you like):
> 
> 1. Is there a performance loss on searches and joins when I use the OID
> as a liniking field as opposed to a SERIAL column?

yes, because indexes are automatcally created on serials.

> 2. Can I define my own index on the OIDs of a table?

sure, create index oid_idx on table(oid);


Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc        | Hub.Org Networking Services
jeff@pgsql.com        | jeff@hub.org
www.pgsql.com        | www.hub.org
1-902-542-0713        | 1-902-542-3657
-----------------------------------------------------
Facsimile : 1 902 542 5386
IRC Nick  : bignose



pgsql-sql by date:

Previous
From: Grant Finnemore
Date:
Subject: Re: Q: performance on some selects (7.0.2)?
Next
From: Michael Ansley
Date:
Subject: RE: Re: OID Perfomance - Object-Relational databases