Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4CF6B650058 for ; Tue, 12 Aug 2008 09:51:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 89256-09 for ; Tue, 12 Aug 2008 09:51:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from oxford.xeocode.com (unknown [82.16.16.210]) by postgresql.org (Postfix) with ESMTP id D2FCB650054 for ; Tue, 12 Aug 2008 09:51:44 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1KStLc-0001e2-Ez; Tue, 12 Aug 2008 13:51:36 +0100 To: "Mario Weilguni" Cc: , "Jay" , Subject: Re: Using PK value as a String In-Reply-To: <48A15ECF.5030203@sime.com> (Mario Weilguni's message of "Tue\, 12 Aug 2008 11\:58\:39 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.performance" 6479) References: <18986.60888.qm@web25807.mail.ukl.yahoo.com> <48A15ECF.5030203@sime.com> From: Gregory Stark Organization: EnterpriseDB Date: Tue, 12 Aug 2008 13:51:36 +0100 Message-ID: <87od3ywg4n.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200808/117 X-Sequence-Number: 30998 "Mario Weilguni" 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!