AnsweredAssumed Answered

Performance issue in query ot get row of ACT_HI_VARINST

Question asked by dharmeshyadav on Mar 9, 2018
Latest reply on Mar 14, 2018 by ryandawson

Below query has wrong index - 

SELECT *

FROM (

              SELECT a.*

                             ,ROWNUM rnum

              FROM (

                             SELECT 

                                               RES.*

                             FROM ACT_HI_VARINST RES

                             WHERE RES.PROC_INST_ID_ = : 1

                                           AND RES.NAME_ = : 2

                             ORDER BY RES.ID_ ASC

                             ) a

              WHERE ROWNUM < : 3

              )

WHERE rnum >= : 4

 

To enforce the index, somehow can we add below hint ?

/*+ index(RES, ACT_IDX_HI_PROCVAR_PROC_INST) */

Outcomes