2 ms·
In my experience, it's not horrendous in Postgres but still noticeably worse than bigserial. There are often reasons to have UUIDs as secondary keys. But your
by hot_gril 3y ago
In my experience, it's not horrendous in Postgres but still noticeably worse than bigserial.
There are often reasons to have UUIDs as secondary keys. But your DB uses primary keys for disk layout, joins, etc, so I've never seen a good reason to use UUIDs there. Even the CitusDB (horizontally-scaling Postgres) examples use bigserials. I've always regretted using UUID pkeys and never regretted using bigserial.
Side bonus of bigserials is you get ordering, which matters in some contexts.