pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: UUID or auto-increment
Date: Mon, 10 Aug 2020 12:53:32 -0400
Message-ID: <20200810165332.GV29590@tamriel.snowman.net> (raw)
In-Reply-To: <2663a1f2-7377-58e7-ad7d-a867fe75cb15@gmail.com>
References: <CAHaowgVasGvbuEBW4Fh-4ke31A9YfAF=VO5yk0OwS+0TT+azrw@mail.gmail.com>
	<837516231.2607507.1597077490690@mail.yahoo.com>
	<2663a1f2-7377-58e7-ad7d-a867fe75cb15@gmail.com>

Greeitngs,

* Ron (ronljohnsonjr@gmail.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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (13+ messages)  latest in thread

Message-ID: <20200810165332.GV29590@tamriel.snowman.net>
Permalink:  ../20200810165332.GV29590@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20200810165332.GV29590@tamriel.snowman.net

 · 

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: sfrost@snowman.net, ronljohnsonjr@gmail.com
  Subject: Re: UUID or auto-increment
  In-Reply-To: <20200810165332.GV29590@tamriel.snowman.net>
  References: <CAHaowgVasGvbuEBW4Fh-4ke31A9YfAF=VO5yk0OwS+0TT+azrw@mail.gmail.com> <837516231.2607507.1597077490690@mail.yahoo.com> <2663a1f2-7377-58e7-ad7d-a867fe75cb15@gmail.com> <20200810165332.GV29590@tamriel.snowman.net>

* 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