From: Gregory Stark <stark@enterprisedb.com>
To: Mario Weilguni <mweilguni@sime.com>
Cc: valiouk@yahoo.co.uk
Cc: Jay <arrival123@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Using PK value as a String
Date: Tue, 12 Aug 2008 13:51:36 +0100
Message-ID: <87od3ywg4n.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <48A15ECF.5030203@sime.com>
References: <18986.60888.qm@web25807.mail.ukl.yahoo.com>
<48A15ECF.5030203@sime.com>
"Mario Weilguni" <mweilguni@sime.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!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stark@enterprisedb.com, mweilguni@sime.com, valiouk@yahoo.co.uk, arrival123@gmail.com
Subject: Re: Using PK value as a String
In-Reply-To: <87od3ywg4n.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox