V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hostigation
V2EX  ›  程序员

mysql 中一个将近 1 亿行的表,要增加一个字段会很慢吗?

  •  
  •   hostigation · 2015-11-24 10:15:04 +08:00 · 2569 次点击
    这是一个创建于 3103 天前的主题,其中的信息可能已经有所发展或是发生改变。
    triffic
        1
    triffic  
       2015-11-24 11:15:44 +08:00
    这个字段是索引的一部分吗
    SoloCompany
        2
    SoloCompany  
       2015-11-25 03:05:24 +08:00
    https://mariadb.com/kb/en/mariadb/alter-table/

    When does ALTER TABLE copy all data?

    Here is a list of the actions that can be performed without having to copy the table: ...
    显然,增加新的列不在这个列表内
    SmiteChow
        3
    SmiteChow  
       2015-11-25 10:12:01 +08:00
    无论慢不慢,请先备份
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1289 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:03 · PVG 02:03 · LAX 11:03 · JFK 14:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.