Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Mike Sofen
From: George Neuner Sent: Tuesday, August 30, 2016 5:54 PM >Mike Sofen wrote: So in this scenario, I'm using >BOTH bigserials as the PK and uuids as AKs in the core tables. I >reference the bigints for all joins and (have to) use the uuids for the >filters. It's been working ok so far,

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread George Neuner
On Tue, 30 Aug 2016 09:40:33 -0700, "Mike Sofen" wrote: >From: Tom Lane Sent: Tuesday, August 30, 2016 7:16 AM > >>Do you actually *need* UUID keys, and if so why? A plain old bigint column >>is smaller, cheaper to index, and the natural mechanism for generating it >>(ie a

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Mike Sofen
From: Tom Lane Sent: Tuesday, August 30, 2016 7:16 AM Luke Gordon < gord...@gmail.com> writes: > However, according to a message on this mailing list, Postgres doesn't > have clustered indexes: > "But Postgres doesn't _have_ clustered indexes, so that article >

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Francisco Olarte
Luke: On Tue, Aug 30, 2016 at 3:59 PM, Luke Gordon wrote: > I'm trying to decide on which UUID generator to use for my Postgres > database, and I've narrowed it down to gen_random & uuid_generate_v1mc. > > There's a fascinating article that discusses performance implications >

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Tom Lane
Luke Gordon writes: > PS I attempted to reply to the above thread, but downloading the "raw" link > resulted in a basic auth challenge. If I entered my mailing list > credentials, I'd just get rechallenged with basic auth... BTW, so far as that goes: it's just a weak anti-bot

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Luke Gordon
Tom, Ah, that makes more sense. Thank you very much! On Tue, Aug 30, 2016 at 9:15 AM, Tom Lane wrote: > Luke Gordon writes: > > However, according to a message on this mailing list, Postgres doesn't > have > > clustered indexes: > > "But Postgres

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Melvin Davidson
On Tue, Aug 30, 2016 at 9:59 AM, Luke Gordon wrote: > I'm trying to decide on which UUID generator to use for my Postgres > database, and I've narrowed it down to gen_random & uuid_generate_v1mc. > > There's a fascinating article that discusses performance implications >

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Tom Lane
Luke Gordon writes: > However, according to a message on this mailing list, Postgres doesn't have > clustered indexes: > "But Postgres doesn't _have_ clustered indexes, so that article doesn't > apply at all. The other authors appear to have missed this important point." >

[GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Luke Gordon
I'm trying to decide on which UUID generator to use for my Postgres database, and I've narrowed it down to gen_random & uuid_generate_v1mc. There's a fascinating article that discusses performance implications between gen_random_uuid & uuid_generate_v1mc: