Re: UUID or auto-increment - Mailing list pgsql-general

From Ravi Krishna
Subject Re: UUID or auto-increment
Date
Msg-id 837516231.2607507.1597077490690@mail.yahoo.com
Whole thread Raw
In response to UUID or auto-increment  (Ashkar Dev <ashkardev@gmail.com>)
Responses Re: UUID or auto-increment
Re: UUID or auto-increment
List pgsql-general
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.

pgsql-general by date:

Previous
From: "pgml@gmx.de"
Date:
Subject: SQL Question about like
Next
From: Ron
Date:
Subject: Re: SQL Question about like