All Questions
Scaling Writes medium

In a sharded database, why is using a standard `AUTO_INCREMENT` integer as a Primary Key problematic?

  1. A It causes ID collisions. Two different shards might independently generate ID 105, preventing you from merging data later without conflicts.
  2. B Integers take up too much space.
  3. C SQL databases do not support integers.
  4. D It makes the URLs look ugly.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions