Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在表中添加一个新列。我想知道运行更改表查询以添加新列然后运行更新查询以在列中插入数据是否更快。与在新表中创建相比。
我想我可以尝试两者都看女巫更快,但也许有人可以解释为什么?
视点速度:
只创建一列而不是重新创建表更快
观点数据一致性:
一个表可能与其他数据库表有很多关系(它可以是其他表的外部表),所以如果你重新创建一个表,你必须重视一个关于更新其他表引用的脚本。
我希望,我已经完全回答了你的问题。祝你今天过得愉快