From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Mario Weilguni" <mweilguni(at)sime(dot)com> |
Cc: | <valiouk(at)yahoo(dot)co(dot)uk>, "Jay" <arrival123(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Using PK value as a String |
Date: | 2008-08-12 12:51:36 |
Message-ID: | 87od3ywg4n.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Mario Weilguni" <mweilguni(at)sime(dot)com> writes:
> UUID is already a surrogate key not a natural key, in no aspect better than a
> numeric key, just taking a lot more space.
>
> So why not use int4/int8?
The main reason to use UUID instead of sequences is if you want to be able to
generate unique values across multiple systems. So, for example, if you want
to be able to send these userids to another system which is taking
registrations from lots of places. Of course that only works if that other
system is already using UUIDs and you're all using good generators.
You only need int8 if you might someday have more than 2 *billion* users...
Probably not an urgent issue.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2008-08-12 13:06:21 | Re: Using PK value as a String |
Previous Message | Jay D. Kang | 2008-08-12 10:18:26 | Re: Using PK value as a String |