AnsweredAssumed Answered

trouble with query in our database

Question asked by neosss on May 8, 2015
Latest reply on May 14, 2015 by neosss
out DB is Oracle 11g

we see 1 trouble query

SELECT *
  FROM (SELECT a.*, ROWNUM rnum
          FROM (SELECT RES.*
                  FROM ACT_RU_JOB RES
                 WHERE     (RETRIES_ > 0)
                       AND (DUEDATE_ IS NULL OR DUEDATE_ < :1)
                       AND (LOCK_OWNER_ IS NULL OR LOCK_EXP_TIME_ < :2)
                       AND (EXCLUSIVE_ = 1)
                       AND (PROCESS_INSTANCE_ID_ = :3)) a
         WHERE ROWNUM < :4)
WHERE rnum >= :5

it runs very slow.

how it fix?

Outcomes