3 ms·
Having only a single auto-increment column with sharding is likely a bad idea to begin with. In most DBs, (not MySQL I think), the engine uses a specialized set
by newt0311 18y ago
Having only a single auto-increment column with sharding is likely a bad idea to begin with. In most DBs, (not MySQL I think), the engine uses a specialized setup to hand out the next value in line globally so that while the auto-increment column will be unique, it will be slow. In MySQL, I think they use some sort of special table and mark the rows as they get used up (I could be wrong. I don't usually use MsSQL). Thus, on a MySQL DB, it is possible to get incorrect behavior when changing something in the middle of transactions. So, adding in shards with auto-increment in MySQL could turn bad very quickly and very silently.