是的,如果为store_id和template_id分别创建了索引,WHERE store_id = xxx and template_id = xxx将会命中这两个索引。这种情况下,MySQL可以使用两个索引的交集来快速定位匹配的行。

mysql的proudct表里面有store_id和template_id如果只为store_id和template_id单独做索引WHERE store_id = xxx and template_id = xxx能命中索引吗?

原文地址: https://www.cveoy.top/t/topic/fJV3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录