Query Tuning
Gurus,
I have this query which uses literals and has different elapse times every time its been executed even for the same (PHV) execution plan ,it puzzles me why its not consistent .I understand if the execution plan changes but its the same plan.
Please help me with any recommendation that can speed up the response time of this query ,I have tons of similar queries like this where either some where clause are changed or the inlist values.These queries are runtime generated(dynamic).
How can i replace the huge inlist with bind variables?
SELECT DISTINCT X.PRE_LDR_MBR_FLG, INIT_IBT_PRVW_FLG , CPYRGHT_RQTS_RDY_FOR_USE , X.MSR_CDE , X.ITM_MTADTA_VRSN_SEQ , CLSFN_NAM_1_1 , CLSFN_NAM_3_2 , X.TST_CDE , CLSFN_NAM_2_4 , X.ITM_NAM , CLSFN_NAM_2_2 , CLSFN_NAM_1_2 , X.ATHR_USR_LGN_ID , X.PGM_CDE , X.DEL_FLG , USR_DFND_FLD_6_TXT , USR_DFND_FLD_7_TXT , CLSFN_NAM_1_4 , X.LST_UPDT_LGN_UID , USR_DFND_FLD_2_TXT , ETNC_CDE , X.LCK_LGN_UID , X.ITM_ACSN_ID , CPYRGHT_RQTS_PENDING , ITM_CNTNT_XML_WRD_CNT , X.ITM_DSC , USR_DFND_FLD_9_TXT , TOTAL_ACTV_CPYRGHT_RQTS , X.SET_STS_CDE , USR_DFND_FLD_1_TXT , X.AD_HOC_WKFLW_STEP_CDE , USR_DFND_FLD_10_TXT , CLSFN_NAM_1_3 , ITM_FAIRNS_RVW_STS , CLSFN_NAM_2_3 , X.ITM_CNTNT_VRSN_SEQ , SPELL_CHK_FLG , X.WKFLW_STEP_CDE , X.EXTRNL_ID , USR_DFND_FLD_5_TXT , X.OWNR_USR_LGN_ID , X.RDY_FOR_USE_FLG , FNL_IBT_PRVW_FLG , GNDR_TYP_CDE , X.ANS_KY_TXT , X.LST_UPDT_DTM , X.ITM_ID , USR_DFND_FLD_3_TXT , X.STS_CDE , X.LCK_DTM FROM