1

I have a mySQL table with 3 billions records. I had set Auto Increment id as unSigned integer. id is primary key. But now, it is reaching the upper limit. I want to convert my id field to bigInteger, but mySQL stops and waits for a long time.

How can I convert the id field to bigInteger without letting the project down?

I wanted to add column to this table before and waited 2 days. I had to cancel.

mySQL version: 5.7.14 (Google Cloud Sql)

Table Engine: InnoDB

Fatih Aytekin
  • 180
  • 1
  • 8
  • id is a primary key ?, do you have indexes based on id or others indexes ?, if yes, drop indexes , change type of field, then recreate indexes. – Eric Oct 17 '19 at 15:17
  • 2
    you can see also here : see answer : create a new table with same structure but with id as bigint, and use dump do export old and reimport to the new table. https://stackoverflow.com/questions/12774709/mysql-very-slow-for-alter-table-query – Eric Oct 17 '19 at 15:26

0 Answers0