1.函数索引
在create_date 中加入to_char 函数索引
CREATE INDEX UCMDATA.IX_UCM_FUNCTION_CRE_DATE ON UCMDATA.UCM_MSG_INFO (to_char(created_date ,'yyyy-mm-dd')) INITRANS 16;
2.强制走索引
INDEX(表别名 索引名称)
例子:这个是走3个强制索引的
select/*+
INDEX(pa IDX_PAGREE_1)INDEX(pi IDX_PITEM_5)INDEX(pd IDX_PRODUCTS_3)*/ * from table1 c,table2 pa,table3 pi,table4 pdwhere pa.customerid = c.customeridand pi.purchaseagreementid = pa.idand pi.productid = pd.idand pd.statusid=3601;