1.创建一个复合索引:
CREATE INDEX IDX_AIRM_ZY_MAC ON AIRM_ZY_MASTER_ADUIT_CREDIT(CREDIT_NO,TOTALBONUSAMT,CREDIT_RESULT,QUOTA,CREDIT_TIMESTAMP);
2.查询数据库,验证索引是否生效:
EXPLAIN PLAN for
SELECT CREDIT_NO,TOTALBONUSAMT,CREDIT_RESULT,QUOTA,CREDIT_TIMESTAMP from AIRM_ZY_MASTER_ADUIT_CREDIT WHERE CREDIT_NO=11;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);