MySQL when can I use HASH instead of BTREE

无人久伴 提交于 2020-01-02 04:05:21

问题


Since MySQL uses BTREE by default when creating an index, is there some instance when I can use HASH? For example, if my table only consists of Foreign Keys which are just INT UNSIGNED values. Is it a good improvement to override BTREE with HASH in this case?

Not sure if it matters, but I'm using InnoDB.


回答1:


The HASH index type is only supported for MEMORY (aka HEAP) storage engine.



来源:https://stackoverflow.com/questions/14418260/mysql-when-can-i-use-hash-instead-of-btree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!