Interview practice question
Running out of integer IDs
Backend Engineering · Relational Databases · Experienced
Your orders table uses a 32-bit integer primary key and is approaching 2.1 billion. What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Migrate to bigint before overflow.
- Large table: add new column, backfill, swap.
- Update foreign keys too.
- Monitor sequence usage.
- Plan well ahead.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.