pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Laiszner Tamás <t.laiszner@outlook.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Composite type storage overhead
Date: Wed, 23 Oct 2019 16:02:02 -0600
Message-ID: <d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.com> (raw)
In-Reply-To: <VI1PR0602MB353483C1C1D2BA99797A0F76F36B0@VI1PR0602MB3534.eurprd06.prod.outlook.com>
References: <VI1PR0602MB3534C22D06A205A990F235DFF36B0@VI1PR0602MB3534.eurprd06.prod.outlook.com>
	<90AA42A6-38FC-4117-90B5-4539302CA154@gmail.com>
	<VI1PR0602MB353483C1C1D2BA99797A0F76F36B0@VI1PR0602MB3534.eurprd06.prod.outlook.com>


On 10/23/19 3:24 PM, Laiszner Tamás wrote:
> That's an absolutely reasonable suggestion. I am still in the 
> exploration phase so while this solution is not completely ruled out, 
> I have some concerns about it:
>
> 1.
>     Although it does not enforce, but the UUID type kind of suggests a
>     specific interpretation of the data. Of course the documentation
>     says you are free to use any algorithm to generate the values, but
>     there are quite a few standard UUID types and we are not planning
>     to use any of them.
> 2.
>     The serialization format is different than needed by the
>     application and, while once again this is not a hard technical
>     barrier, that might cause slight additional complexity and confusion.
> 3.
>     The value is logically defined as a 128-bit integer, that is in
>     itself a compound value split into a few "bit groups". Extracting
>     these parts can be done by simple (and supposedly efficient)
>     bitwise operators when stored as integer, but becomes much more
>     cumbersome with UUID, I guess.
>
> ------------------------------------------------------------------------
> *Feladó:* Rob Sargent <robjsargent@gmail.com>
> *Elküldve:* 2019. október 23., szerda 22:58
> *Címzett:* Laiszner Tamás <t.laiszner@outlook.com>
> *Másolatot kap:* pgsql-general@postgresql.org 
> <pgsql-general@postgresql.org>
> *Tárgy:* Re: Composite type storage overhead
>
>
>> On Oct 23, 2019, at 1:32 PM, Laiszner Tamás <t.laiszner@outlook.com 
>> <mailto:t.laiszner@outlook.com>> wrote:
>>
>> Hey there,
>>
>> I am currently exploring the options to utilize 128-bit numeric 
>> primary keys. One of the options I am looking at is to store them as 
>> composites of two 64-bit integers.
>>
>> I would highly appreciate any comments or additional information on 
>> this topic.
>>
>> Best regards,
>> Tamas
> Why not use UUID type?
>

Putting logic and meaning into primary keys?  To what end, I wonder.

view thread (8+ messages)  latest in thread

Message-ID: <d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.com>
Permalink:  ../d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.com/
Also on:    postgresql.org/message-id/d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com, t.laiszner@outlook.com
  Subject: Re: Composite type storage overhead
  In-Reply-To: <d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.com>
  References: <VI1PR0602MB3534C22D06A205A990F235DFF36B0@VI1PR0602MB3534.eurprd06.prod.outlook.com> <90AA42A6-38FC-4117-90B5-4539302CA154@gmail.com> <VI1PR0602MB353483C1C1D2BA99797A0F76F36B0@VI1PR0602MB3534.eurprd06.prod.outlook.com> <d0e3b162-f6a1-8b14-cbc2-5622c793dcb4@gmail.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