0
SELECT *
FROM t1, t2 , t3
WHERE t1.row_id = t2.invoice_id(+)
and t2.voi_id = t3.row_id(+)
and type = 'Dec'
order by 1
我有3個指標,一個是在加入每一列,但似乎解釋計劃使用對錶進行全表掃描,而不使用索引:外連接和使用Oracle的索引
計劃
1 Every row in the table t1 is read.
2 The rows were sorted to support the join at step 5.
3 Every row in the table t2 is read.
4 The rows were sorted to support the join at step 5.
5 Join the sorted results sets provided from steps 2, 4.
6 Rows were returned by the SELECT statement.
在Oracle決定使用索引之前,表中需要有足夠的行才能使用索引。 – Glenn
您可能想嘗試使用Oracle提示來查看它是否更改了解釋計劃 - SELECT/* + INDEX(t1 t1_index_name_here)*/*從t1,t2,t3 ... –
如果標準解釋計劃格式被使用。運行'select select * ...;'然後'select * from table(dbms_xplan.display);'並將* entire *輸出添加到問題中。 –