摘要:
场景一: 复合索引的替代方法,对多列字段拼接做hash,引入一个hashed 字段,对此字段添加索引,可以做到复合索引查询速度快,例: SELECT * FROM tbl_name WHERE hash_col=MD5(CONCAT(val1,val2)) AND col1=val1 AND col 阅读全文
摘要:
Most MySQL indexes (PRIMARY KEY, UNIQUE, INDEX, and FULLTEXT) are stored in B-trees. Exceptions: Indexes on spatial data types use R-trees; MEMORY tab 阅读全文