Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> indexed access instead of FULL TABLE ACCESSES
How can I direct the optimizer to use indexed access instead of
FULL TABLE ACCESSES. There is a subquery witch selects 100 rows
out of 10.000 (up to 500.000) to select a very big join of these
100 rows. In the example below I reduced the complexity of this
join to illustrate my problem. Defining the subselect as a
join does not help, the explain plan is the same.
Does anybody know how I can rewrite this statement so that it performs, thanks for any help.
Ritchie
-------simplefied statement---------------------------------------
SELECT
A.OID as col1, B.OID as col2, C.NUMBER_ as col3, C.SURNAME as col4, C.FIRSTNAME as col5
B.OID = A.PERSONALADVISERRELATION AND C.NUMBER_ = B.OWNERPARTY AND A.OID IN (SELECT SEARCHA.oid
INCLUDEDPARTY (oid) INCLUDEDPARTY (OWNERPARTYLIST) PERSONALPARTY (number_)
------explained as--------------------------------------------------
SELECT STATEMENT Cost = 1843411718
SORT ORDER BY
HASH JOIN
TABLE ACCESS FULL PERSONALPARTY HASH JOIN TABLE ACCESS FULL PERSONALADVISERRELATION HASH JOIN VIEW SORT UNIQUE COUNT STOPKEY HASH JOIN TABLE ACCESS BY INDEX ROWID INCLUDEDPARTY INDEX RANGE SCAN INCLUDEDPARTYIDX2 INDEX FULL SCAN PARTYSORTIDX1 TABLE ACCESS FULL INCLUDEDPARTYReceived on Tue Jul 28 1998 - 05:23:47 CDT
-------------------------------------------------------------------
![]() |
![]() |