欢迎各位兄弟 发布技术文章
这里的技术是共享的
select a.* from mvn_artifact a force index(IX_Path) inner join (select artifactPath from mvn_artifact_tag where tagId = 361) as ap on a.path like concat(ap.artifactPath,'%') order by a.lastModifiedTime desc limit 0,20
在mvn_artifact a
后面用 force index(IX_Path)
强制指定使用索引IX_Path.
来自 http://outofmemory.cn/code-snippet/12360/mysql-force-index