Best practices for efficiently storing md5 hashes in mysql

廉价感情. 提交于 2019-12-28 11:58:06

问题


Possible field types:

BINARY(16)
CHAR(32)
BIGINT + BIGINT

How do I decide which one to use?


回答1:


If the column is indexed and you know what you're doing, BINARY(16) for performance reasons.

Otherwise, CHAR(32) is fine. Make sure the column uses the ascii charset though. (ascii_bin for example)



来源:https://stackoverflow.com/questions/2326584/best-practices-for-efficiently-storing-md5-hashes-in-mysql

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