
Do you really need a UUID/GUID? - pavanlimo
https://rclayton.silvrback.com/do-you-really-need-a-uuid-guid
======
wtbob
> Databases like MySQL do not have a native implementation of the data
> structure.

Postgres has a native UUID type (I don't know the details of its storage
representation, though). Using MySQL by choice in 2015 is a bit of a design
smell, though.

> This means the column that carries the value must at least be 36 characters
> (VARCHAR(36)). When you consider the text encoding (e.g. MySQL character
> set) used to represent strings, this could mean 2-3 bytes per character (if
> using UTF-8).

Ummm, this is just wrong. The UTF-8 representations of [0-9A-Ba-b] are all
single bytes.

~~~
anarazel
> Postgres has a native UUID type (I don't know the details of its storage
> representation, though).

16 bytes, fixed width:

    
    
      postgres=# SELECT typname, typbyval, typlen FROM pg_type WHERE typname = 'uuid';
      ┌─[ RECORD 1 ]────┐
      │ typname  │ uuid │
      │ typbyval │ f    │
      │ typlen   │ 16   │
      └──────────┴──────┘

