????????Index?????????????????????????????????????????????????д??????????????????????????д????????????д????е?????????????????????
?????????5??????????????????????????????????????????????磬??????????????????????????????
????-- ??????
????CREATE INDEX ON customer (first_name);
????-- 5???
????CREATE INDEX ON customer (first_name?? last_name);
????????????????????????????
??????η???????????????
????????????Oracle?????????????????????????????????????α? ???? ????????κβ???????:
SELECT sql_fulltext
FROM v$sql
WHERE sql_id IN (
SELECT sql_id
FROM v$sql_plan
WHERE (object_owner?? object_name)
= (('OWNER'?? 'IDX_CUSTOMER_FIRST_NAME'))
)
ORDER BY sql_text;
?????????????????????????α???? ???? ?е?????SQL???V$SQL????????????????????????α? ???? ?м????????κ??з???????????м??????V $ sql_plan????
??????????????????????????????????????????κ??У??????ó???????????????????????????????
???????????????????????????????????????????????????:
???????м???????г????в????v$sql_plan?????????????
SELECT owner?? index_name
FROM all_indexes
WHERE owner = 'OWNER'
AND (owner?? index_name) NOT IN (
SELECT object_owner?? object_name
FROM v$sql_plan
WHERE object_owner IS NOT NULL
AND object_name IS NOT NULL
)
ORDER BY 1?? 2
????????????????????????????????????????????б???ù???