-
Bug Report
-
Resolution: Duplicate
-
L3 - Default
-
None
-
7.8.0
-
None
We've found the query bellow taking around 7s to finish.
As far as we checked, the query is doing a full table scan.
Database version: MySQL 5.6.35-log
We are afraid of serious performance degradation on the nearby future.
select distinct RES.* FROM ACT_HI_ACTINST RES left JOIN ( SELECT A.* FROM ACT_RU_AUTHORIZATION A WHERE A.TYPE_ < 2 AND ( A.USER_ID_ in ( ?, '') OR A.GROUP_ID_ IN ( ? , ? , ? , ? ) ) AND ( ( A.RESOURCE_TYPE_ = ? AND A.PERMS_ & ? = ? ) ) ) AUTH ON (AUTH.RESOURCE_ID_ in (RES.PROC_DEF_KEY_, '')) WHERE AUTH.RESOURCE_ID_ IS NOT NULL order by RES.START_TIME_ desc LIMIT ? OFFSET ?