Home  >  Article  >  Backend Development  >  请问一个mysql索引的有关问题

请问一个mysql索引的有关问题

WBOY
WBOYOriginal
2016-06-13 13:37:47748browse

请教一个mysql索引的问题
使用联合主健
PRIMARY KEY (`aid`,`bid`)
关于bid的索引需要重新建一个吗?

------解决方案--------------------
和联合索引一样的,要看你的数据查询条件

如果需要仅根据bid找出数据,一般还是要建的,,,看情况,看数据规模,查询条件
------解决方案--------------------
需要重新建一个

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn