版权声明:这可是本菇凉辛辛苦苦原创的,转载请一定带上我家地址,不要忘记了哈 . https://cloud.tencent.com/developer/article/1433156
CREATE INDEX idx_status_stitution ON borrow_order (status,institution_code)
idx_status_stitution :索引名
borrow_order :表名
status,institution_code:要建索引的多个字段名
show index from borrow_order
写查询条件时,索引中在前面的字段先查。
或者根据查询来建联合索引,就在建立索引时,把先查的字段写在前面,如本例中的 status 。
ALTER TABLE borrow_order DROP INDEX idx_status_stitution
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有