
• Retroactively named ALGORITHM=COPY in MySQL 5.6 and MariaDB 10.0
• Until MariaDB 10.2.13 (MDEV-11415), lots of unnecessary undo logging (and the
infamous “commit every 10,000 rows” hack to speed up crash recovery).
• Inserting into each index one record at a time (very inefficient).
• No sort buffer is being used inside InnoDB (other than the change buffer)
• Writes a large amount of redo log for the second copy of the table.
Generic ALTER TABLE in MariaDB
CREATE TABLE …; INSERT…SELECT; RENAME …; DROP TABLE …;
评论