Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Storing GUIDs in Oracle
Now we're getting somewhere. This is the conversation I was hoping for,
instead of the flame war. I did consider storing it as a fixed CHAR(32), but
I don't like the idea of my keys being that large for performance reasons.
Any guess as to which might perform better - CHAR(32) or RAW(16)?
I've also considered using an 64 bit integer for my primary keys instead. I lose global uniqueness, but I would gain a more efficient index. Anyone know of any caveats to using 64-bit integers as primary keys?
Thanks.
"Maximus" <qweqwe_at_qwqwewq.com> wrote in message
news:1oCTa.524755$Vi5.13473021_at_news1.calgary.shaw.ca...
> "Sybrand Bakker" <gooiditweg_at_sybrandb.demon.nl> wrote in message
> news:2kqthvcvga18jsbcc5qmgs99rgdi96rb90_at_4ax.com...
> > On Wed, 23 Jul 2003 14:21:28 -0400, "Jeff Boenig"
> > <jeff.boenig_at_elsitech.com> wrote:
> >
> > >There isn't a straightforward answer to my questions in the SQL
> Reference. I
> > >want to design my database to work equally well with MS-SQL and Oracle,
> > >which is why I thought posting these questions on this newsgroup would
be
> a
> > >constructive thing to do.
> >
> > As MS-SQL and Oracle are two completely different architectures, and
> > apart from PL/SQL Oracle treats the RAW(16) as a VARCHAR2, requiring
> > implicit conversion all the time,. you are going to end up in hell.
> > Please reconsider.
>
> UUIDs can also be stored in ascii hexdecimal format, this gets around
> implicit conversions but of course requires more storage.
>
>
Received on Wed Jul 23 2003 - 15:52:15 CDT