SQL建索引
- where a = ? and b > ? and c in ? 如何建立索引
- where a = ? and b > ? and c < ? 如何建立索引
面试被问麻了,求助牛油们,这两个sql该怎么建索引?
- where a = ? and b > ? and c < ? 如何建立索引
面试被问麻了,求助牛油们,这两个sql该怎么建索引?
全部评论

第一个a c b,第二ab或者ac嘛?
可以再具体点吗,没看懂想问什么
创建(a,b)联合索引就可以了吧,(a,b,c)这两条语句都用不到 c

范围判断可以先建 然后再建= 最后建in吧
相关推荐
点赞 评论 收藏
分享
点赞 评论 收藏
分享