# UUID as Primary Key

> What are the drawbacks of using UUIDs as primary keys compared to auto-increment integers, and how can you reduce them?

Canonical: https://www.internhack.in/learn/interview/database-design/db-uuid-vs-int-primary-key
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

What are the drawbacks of using UUIDs as primary keys compared to auto-increment integers, and how can you reduce them?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

UUID, UUIDv7, Clustered Index, Page Splits, Auto-increment Keys

Previous: [Horizontal vs Vertical Partitioning](https://www.internhack.in/learn/interview/database-design/db-partitioning-horizontal-vs-vertical) · Next: [Fan-out Problem](https://www.internhack.in/learn/interview/database-design/db-fan-out-problem) · [All of Database Design](https://www.internhack.in/learn/interview/database-design)

## More Database Design questions

- [Write-Ahead Logging (WAL)](https://www.internhack.in/learn/interview/database-design/db-write-ahead-logging-wal)
- [Read Replicas vs. Caching](https://www.internhack.in/learn/interview/database-design/db-read-replicas-vs-caching)
- [Full-Text Search](https://www.internhack.in/learn/interview/database-design/db-full-text-search-vs-like)
- [Checkpointing](https://www.internhack.in/learn/interview/database-design/db-checkpointing)
- [Star vs. Snowflake](https://www.internhack.in/learn/interview/database-design/db-star-vs-snowflake-schema)
- [Polymorphic Associations](https://www.internhack.in/learn/interview/database-design/db-polymorphic-associations)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Database Design](https://www.internhack.in/learn/interview/database-design)
