Re: serial + db key, or guid? - Mailing list pgsql-general

From Christophe Pettus
Subject Re: serial + db key, or guid?
Date
Msg-id 6544D62C-3FF4-46B2-BD5F-845B9AD70B31@thebuild.com
Whole thread Raw
In response to Re: serial + db key, or guid?  (Mark Phillips <mark.phillips@mophilly.com>)
Responses Re: serial + db key, or guid?  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-general

> On Aug 11, 2020, at 09:37, Mark Phillips <mark.phillips@mophilly.com> wrote:
>
> I posed the question on the chance things had evolved since 2012, specifically as it relates to postgres.

The essentials haven't changed.  Keys (such as UUIDs, especially UUID v4) that have most of their randomness in the
mostsignificant bits can cause significant cache hit problems on large indexes.  128 bit keys are usually overkill for
mostapplications, unless you need actual *global* uniqueness across more than a single database or installation; 64 bit
keysare usually sufficient. 

UUIDs (and similar very large random keys) do have the advantage that they are somewhat self-secure: You can expose
themto outsiders without having to worry about other keys being guessable. 
--
-- Christophe Pettus
   xof@thebuild.com




pgsql-general by date:

Previous
From: Mark Phillips
Date:
Subject: Re: serial + db key, or guid?
Next
From: Christopher Browne
Date:
Subject: Re: serial + db key, or guid?