I have a large table (~250 Gb) and I want to change the column of the primary key from
BIGINT. Assuming that the server instance has sufficient resources to configure MySQL in an optimal way for both methods, which method is going to run in the least amount of time?
1. Alter table
2. Creating new table, exporting old with
mysqldump and inserting into the new on with
LOAD DATA INFILE.
Note: I'm aware of pt-online-schema-change, which is probably the best option to alter a table without impacting the usage of the existing DB, but I would like to know which option requires the least time to run.
Bonus: I suspect the answer is the same for both MySQL and MariaDB?