Does adding an auto_incrementing number to a MySQL partitioned table that is not part of the primary key, cause consistency issues?

by Jonathan   Last Updated October 09, 2019 10:06 AM

I have a table that has a primary key which does not include an auto_incrementing number. The table needs to be partitioned (on that primary key) for the overall strategy of reducing contention points.

I need to add an auto_incrementing number outside the primary key/partitions, but I am concerned about how MySQL will be able to keep the right sequenced number, if under the hood, all partitioned tables are in essence different tables and as that auto_incrementing number cannot be in a separate unique index.

So the question is, will I get consistency issues with the sequence doing this or does MySQL have a way to keep it accurate?

Tags : mysql


Related Questions


The equivalent of CTE in MySQL from Microsoft SQL

Updated November 15, 2016 08:02 AM


getting innodb buffer usage

Updated August 24, 2018 15:06 PM