Index not used on DATE col when a range of days are passed in the query
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