Re: UUID or auto-increment

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: UUID or auto-increment
Date: 2020-08-10 16:53:32
Message-ID: 20200810165332.GV29590@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greeitngs,

* Ron (ronljohnsonjr(at)gmail(dot)com) wrote:
> On 8/10/20 11:38 AM, Ravi Krishna wrote:
> >Finally UUID results in write amplication in wal logs.  Keep that in mind
> >if your app does lot of writes.
>
> Because UUID is 32 bytes, while SERIAL is 4 bytes?

and because it's random and so will touch a lot more pages when you're
using it...

Avoid UUIDs if you can- map them to something more sensible internally
if you have to deal with them.

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-08-10 16:58:51 Re: UUID or auto-increment
Previous Message Ron 2020-08-10 16:51:50 Re: UUID or auto-increment