Besides the problems of auto increment columns that you have stated, there are also few other real problems.

- IDs are placed in browser cookies. One can inspect local storage and generate +/- N versions of the ID to get IDs for other users. Using UUID makes it hard to guess.

- A MySQL table cannot be sharded across multiple instances when columns are auto increment. This has a huge impact. One of our tables containing over 20M auto incremented rows is pretty hard to shard now. Although Vitess sequences offer an alternative, one should stay away from auto increment values if they ever plan to shard their table.



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store