Re: UUID, performance of primary keys

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: andreas(at)junius(dot)info
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: UUID, performance of primary keys
Date: 2009-06-18 12:00:08
Message-ID: 264855a00906180500w6ea867b6v81fb024177e64101@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Jun 18, 2009 at 3:24 AM, Andreas Junius <andreas(at)junius(dot)info> wrote:

> Hi Postgres professionals,
>
> I'd like to use UUID for object id's (java.util.UUID). Such an object
> consists of two long values. I could now use two columns (int8) in a table
> for the primary key or one using the string representation. But I don't know
> which option is the more performant one or if there exist another more
> suitable solution. Does anybody know more about this issue?
>

The ints will be faster, I believe. However, there is a UUID data type in
postgresql. I'm not sure what its performance would be, relative to the
other two options.

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Lennin Caro 2009-06-18 15:10:53 Re: problem with sequence number using a trigger
Previous Message Andreas Junius 2009-06-18 07:24:43 UUID, performance of primary keys