3 ms·
Because an auto-incrementing id column has to be coordinated between processes that are writing to the database. That means allocating ids in blocks that are la
by rswail 5y ago
Because an auto-incrementing id column has to be coordinated between processes that are writing to the database. That means allocating ids in blocks that are large enough that processes aren't blocked in getting an allocation, but they still need to request a block to maintain writing.
That sequence allocation needs to be ACID as well, so that there is no chance of any allocation being repeated.