Database Tuning (MOSC)

MOSC Banner

Index not used on DATE col when a range of days are passed in the query

edited Aug 31, 2022 3:26AM in Database Tuning (MOSC) 13 commentsAnswered

Hello All,

can someone please help me understand why INDEX (which is on SCANNED and datatype is Date) is not used when i am .range of days?

*******

select out_value,count(*) as freq from tws_rav_prd.st_iws_fields where (application,batch)

in(select application,batch from tws_rav_prd.st_iws_summary where application = 'xxxx' and scanned between sysdate - 60 and sysdate )

and field_name in ('ClassificationTitle','ClassificationFormat')

and op_setvalue = 1

group by out_value;

********

Indexes are as below:

IDX_FEILD_ID ST_IWS_FIELDS

IDX_PAGE_ID ST_IWS_FIELDS

IDX_ST_IWS_FIELDS ST_IWS_FIELDS

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center