Menu
Back to Discussions

UUIDs or sequential IDs for database primary keys? Which is better, really?

Ghassan Al-Omari
Ghassan Al-Omari
·3702 views
Hey folks, I've been wrestling with the choice between UUIDs and sequential IDs for primary keys in a new service. UUIDs seem great for distributed systems to avoid coordination, but they can bloat indexes and make joins a bit slower. Sequential IDs are compact and fast but can be a bottleneck or expose information if not handled carefully. What are your go-to strategies and what trade-offs did you prioritize when making this decision?
38 comments

Comments

Loading comments...