簡體   English   中英

如何在不影響生產性能的情況下向超過10 GB的innodb mysql表添加新列?

[英]How to add new columns to over 10 GB innodb mysql table without affecting production performance?

我直接嘗試將3個新列添加到超過10GB的innodb mysql表中,並且正在聯機(讀取/寫入)服務。

我只是像往常一樣使用ALTER TABLE xxx add column yyy ...

由於數據規模大,更改操作非常耗時(超過10分鍾)。

問題似乎在於,它鎖定了整個表,因此在更改時無法使用。

我正在使用mysql-5.6.14,它聲明為支持在線ADD操作。

這是常見問題嗎?

要么

難道我做錯了什么?

我看不出出了什么問題。 建議您在bugs.mysql.com上提交錯誤。

同時,您可以使用pt-online-schema-change進行更改,而幾乎沒有停機時間。

來自https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html#innodb-online-ddl-summary-grid

    Concurrent DML is not allowed when adding an auto-increment column. 

您是否要添加汽車公司專欄?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM