I have an innodb table that contains 70 million records and already has several single column indexes. I want to add a new multicolumn index that would allow me to run queries on multiple columns. I don't mind limited downtime (less than a day) but I want to avoid a repair with keycache or any other issues that might cause the addition of the new index to take a few days or weeks.
With the table being innodb, can the new index be added fairly quickly using CREATE INDEX, or would I need to back up the table and recover it to a new table with the desired indexes already added as is recommended for MyISAM tables? Or is there another strategy that is better suited to innodb?
Welcome to hell. I think you have two choices:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.