mysqljs / mysql

A pure node.js JavaScript Client implementing the MySQL protocol.
MIT License
18.31k stars 2.53k forks source link

表新增一个时间字段使用current_timestamp()和使用null为默认值是否影响性能 #2537

Closed hudongdong129 closed 2 years ago

hudongdong129 commented 2 years ago

比如现在一张表有100万数据 这个时候需要新增一个datetime类型的时间字段,默认为current_timestamp()或null是否性能不一致

dougwilson commented 2 years ago

Hello, and sorry you are having any issues. Unfortunately your question is unrelated to this Node.js module and is just a generic MySQL question. You may want to ask Oracle or on a forum like StackOverflow.