slowness in the camunda 7 database, this is the query that causes the database to crash due to CPU consumption:
select
distinct RES.*
from
siniestros_credito.ACT_RU_EXECUTION RES
inner join siniestros_credito.ACT_RE_PROCDEF P on
RES.PROC_DEF_ID_ = P.ID_
left join
(
select
A.*
from
siniestros_credito.ACT_RU_AUTHORIZATION A
where
A.TYPE_ < 2
and ( A.USER_ID_ in ( $1, '*')
or A.GROUP_ID_ in ($2)
)
and (
(
A.RESOURCE_TYPE_ = $3
and A.PERMS_ & $4 = $5
or
A.RESOURCE_TYPE_ = $6
and A.PERMS_ & $7 = $8
)
)
)
AUTH on
(AUTH.RESOURCE_ID_ in ( RES.ID_ , P.KEY_ , '*' ))
where
(
RES.PARENT_ID_ is null
and
( P.KEY_ = $9
and RES.BUSINESS_KEY_ like $10 escape '\'
and RES.SUPER_EXEC_ is null )
)
and
AUTH.RESOURCE_ID_ is not null
and (RES.TENANT_ID_ is null
)
order by
RES.ID_ asc
limit $11 offset $12