mysql中in之后很慢的优化
好久没有写博客了,今天碰到一个问题。
单独查询rel_role_res表很快,
运行
select sys_role.* from sys_role where FIND_IN_SET(ROLE_ID,queryRelationRoles(94))
很快,0.2s把
结果运行
select distinct(RES_ID) from rel_role_res where
ROLE_ID in (select distinct(sys_role.ROLE_ID) from sys_role whe
原创
2020-05-29 10:43:39 ·
2645 阅读 ·
0 评论