pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ravi Krishna <srkrishna@yahoo.com>
To: pgsql-general@lists.postgresql.org
To: pgsql-general@postgresql.org
Subject: Re: UUID or auto-increment
Date: Mon, 10 Aug 2020 16:38:10 +0000 (UTC)
Message-ID: <837516231.2607507.1597077490690@mail.yahoo.com> (raw)
In-Reply-To: <CAHaowgVasGvbuEBW4Fh-4ke31A9YfAF=VO5yk0OwS+0TT+azrw@mail.gmail.com>
References: <CAHaowgVasGvbuEBW4Fh-4ke31A9YfAF=VO5yk0OwS+0TT+azrw@mail.gmail.com>

Both can handle concurrent writes.  auto-increment is nothing but serial or sequence cols and they can handle unique concurrent request.  That is why sometimes you may have gaps.UUID is not only unique, but is also unique across space. You can have two different databases generate UUID at the same time and it will still be unique. So that will help if you are consolidating different databases into one big data mart and they can all can go to the same table without conflict. With Sequence or Serial that will be a problem.Finally UUID results in write amplication in wal logs.  Keep that in mind if your app does lot of writes.
  

view thread (13+ messages)  latest in thread

Message-ID: <837516231.2607507.1597077490690@mail.yahoo.com>
Permalink:  ../837516231.2607507.1597077490690@mail.yahoo.com/
Also on:    postgresql.org/message-id/837516231.2607507.1597077490690@mail.yahoo.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: srkrishna@yahoo.com
  Subject: Re: UUID or auto-increment
  In-Reply-To: <837516231.2607507.1597077490690@mail.yahoo.com>
  References: <CAHaowgVasGvbuEBW4Fh-4ke31A9YfAF=VO5yk0OwS+0TT+azrw@mail.gmail.com> <837516231.2607507.1597077490690@mail.yahoo.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