PostgreSQL Conference Germany
Die Deutsche PostgreSQL Konferenz
2025

Schedule - PGConf.DE 2025

Fun With UUIDs

Date: 2025-05-08
Time: 13:45–14:30
Room: Ballsaal 1
Level: Intermediate

UUIDs have a bad reputation, mostly based on randomly allocated UUIDs effect on indexes. But UUIDs also give us 16 bytes of space to play with, which can be to our advantage. We can use the space of UUIDs to structure and encode data into our identifiers. This can be really useful for multi-tenant applications, for sharding or paritioning. UUIDs can also help improve you web app security, by not leaking sequentially allocated ids.

We'll take a look at index performance concerns with randomly allocated UUIDs, sequential ids and sensibly structured UUIDs.

Seeing how we can go about extracting information from these UUIDs and how to build these UUIDs inside PostgreSQL, and how we can look at the performance of these functions.

Finally looking at adding support for bitwise operations on UUIDs using an extension.

Speaker

Chris Ellis