What makes a clustered index special is that the leaf level of a clustered index is the actual data—that is, the data is re-sorted to be stored in the same physical order that the index sort criteria state.第二行中间 re-sorted 是亮点。果然重新组织了数据,那要是给5k万行的表重新建立聚集索引,那5kw行的数据都要动啊。
最基础的知识确实要弄清楚。
(偏旁部首 desc , 拼音 asc)
OKDROP INDEX idx_pinyin ON dictionary;
如果表数据可以有多份,那就可以建多个聚集索引,也许将来数据库厂商会考虑这种需求,就是用空间换性能,但现在的数据库都没有实现一个表有多份数据的存储结构,因为实现的技术成本很高(每个insert,delete,update都要维护多份数据,还有锁之类的管理),占用空间也大,对实际应用的优化效果比较难平衡,大部份情况可能性能更差。