facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.
http://myrocks.io
Other
2.47k stars 711 forks source link

alter talbe add index optimization #1376

Open rockeet opened 8 months ago

rockeet commented 8 months ago

Currently creating index by alter table add index ... will scan table one pass for each index, this waste cpu time if there are multi indexes are created in one statement.

It is possible to scan table one pass for all indexes in the alter table statement, especially if the table row is big, the performance improvements should be great.