Mysql: is it true that the entire composite index is invalid if the composite index contains columns with null values?

see the saying on the Internet: in mysql, if the composite index contains columns with null values, the whole composite index is invalid

Is this sentence correct?

Mar.13,2021

No, according to the mysql document, spatial index cannot save null,. Others can: https://dev.mysql.com/doc/ref.

.

Index Class Index Type Stores NULL VALUES Permits Multiple NULL Values IS NULL Scan Type IS NOT NULL Scan Type
Primary key BTREE No No A No No A
Unique BTREE Yes Yes Index Index
Key BTREE Yes Yes Index Index
FULLTEXT N > A Yes Yes Table Table
SPATIAL A No No A

Menu