Reputation: 2888
We have a mysql table that is running out of ids soon (the primary id is a 32-bit integer and the max id is already about 1.5 billion). What is the best way to fix this issue? Alter the id type to 64-bit is an option but that would bring down the database for too long because the table has billion of rows.
Upvotes: 7
Views: 1466
Reputation: 953
then try changing the type of the field. Try some type with a big range like "BIGINT
".
Upvotes: 3
Reputation: 94682
All versions of MYSQL (both 32bit and 64bit) use an 8 byte field for a column defined as BIGINT.
So amend the column to be BIGINT
Upvotes: 3