In mysql optimization, try to avoid setting fields to null, which will affect the query speed. This refers to only whether the index field is not set to null, or it is best not to set all fields to null
查无此人2020-04-07 10:38:55
For the string type, just use EMPTY STRING as the default value. If you don’t use null, the problem you mentioned will not occur.
In the MyISAM engine of Mysql, the null value occupies additional storage space. (1bit), the empty string takes up no space at all.
Null values cannot be stored in B-tree indexes, which will cause serious performance problems when the amount of data is large