How to optimize the performance of the following SQL query?

For the following query , I tried creating index on table tmp.req_index_cont_t with columns indcont_key_1 and ind_no but still optimizer is performing full table scan , I am not getting how to resolve this issue , please guide :

CREATE INDEX tmp.REQ_CONT_T_IDX 
            ON tmp.req_index_cont_t (ind_no, indcont_key_1);

select distinct
            rit.item_no as item_no,
            rit.item_type as item_type,    
            rit.ind_no as ind_no,
            rit.delete_date as req_ind_delete_date,
            indcnt.delete_date as req_ind_cont_delete_date
from
    tmp.req_index_cont_t indcnt,
    tmp.req_index_t rit
where    rit.ind_no             = indcnt.ind_no
    and   indcnt.indcont_key_1 <> 'DN'
    and   rit.ind_state         = 'Approved'
group by    rit.item_no,
            rit.item_type,
            rit.ind_no,
            indcnt.delete_date,
            rit.delete_date ; 


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation