6

在具有 215k+(使用更改表)记录的表上删除外键似乎需要很长时间(17 分钟以上)。有没有可能以某种方式加快这个过程?SQL: ALTER TABLE sales_flat_order_gridDROP FOREIGN KEY FK_SALES_FLAT_ORDER_GRID_STORE;

这是一个需要很长时间的magento升级

4

1 回答 1

3

Unless you are using InnoDB Plugin (and by default, in MySQL 5.0 and 5.1 you are not), removing an index require rebuilding the whole table.

If you can't upgrade MySQL, you should either look at online-schema-change (involving transfering all of the data to a new table without the index) or stop the site, minimize any I/O activity and wait the operation to complete.

于 2012-08-29T12:07:25.900 回答