Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: why the index is not used ?

Re: why the index is not used ?

From: John Barron <jbarron_at_windriver.com>
Date: Wed, 26 Apr 2000 15:30:19 -0700
Message-Id: <10479.104235@fatcity.com>


how many rows in the tables?

At 12:02 PM 4/26/00 -0800, Kevin Tsay wrote:
>Hi listers:
>
>I've a simple parent-child relationship query:
>
>SELECT T.BUSINESS_UNIT_ID, T.TRANSFER_ID, T.TRANSFER_OCCURENCE_TYPE,
>T.TRANSFER_TYPE, T.FROM_SITE_ID, T.TO_SITE_ID, TD.TRANSFER_DETAIL_ID,
>TD.LINE_NO, TD.ITEM_QTY
>FROM TRANSFERS T, TRANSFER_DETAILS TD
>WHERE T.BUSINESS_UNIT_ID=TD.BUSINESS_UNIT_ID
>AND T.TRANSFER_ID=TD.TRANSFER_ID
>AND T.TRANSFER_OCCURENCE_TYPE=TD.TRANSFER_OCCURENCE_TYPE;
>
>Table TRANSFERS has PRIMARY KEY ( BUSINESS_UNIT_ID, TRANSFER_ID,
>TRANSFER_OCCURENCE_TYPE )
>Table TRANSFER_DETAILS has PRIMARY KEY ( BUSINESS_UNIT_ID, TRANSFER_ID,
>TRANSFER_OCCURENCE_TYPE, TRANSFER_DETAIL_ID ) & referential constraint on
>TRANSFERS
>
>and the explain plans are:
>--------------------------------------------------------------------------
>SELECT STATEMENT Optimizer=CHOOSE (Cost=13605 Card=923364 Bytes=129270960)
> MERGE JOIN (Cost=13605 Card=923364 Bytes=129270960)
> SORT (JOIN)
> TABLE ACCESS (FULL) OF TRANSFERS (Cost=274 Card=126961 Bytes=9268153)
> SORT (JOIN)
> TABLE ACCESS (FULL) OF TRANSFER_DETAILS (Cost=1524 Card=923363
>Bytes=61865321)
>--------------------------------------------------------------------------
>
>My question is why the primary key index is not used ?
>
>ORACLE: 7.3.4.3 HP-UX
>Both tables have been analyzed (compute)?
>
>Any insights ?
>
>TIA
>
>Kevin Tsay
>--
>Author: Kevin Tsay
> INET: Kevin_Tsay_at_liz.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
Received on Wed Apr 26 2000 - 17:30:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US