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

Home -> Community -> Usenet -> c.d.o.server -> Re: Question

Re: Question

From: Tim <df_at_sd.net>
Date: Sun, 05 Jan 2003 15:24:01 GMT
Message-ID: <5djg1vk6n61a19pu2m2rgacqd4snfdvsck@4ax.com>


On Sat, 4 Jan 2003 14:20:33 +0100, "Pier Gaetano Novara" <pgaetanoNoSpam_at_csc.com> wrote:

>I have this statement:
>DELETE FROM
> TMP_TABLE_MERGE
>WHERE EXISTS
> (SELECT 1 FROM
> TMP_TABLE_1 T1
> WHERE
> TMP_TABLE_MERGE.OBJECT_ID = T1.OBJECT_ID)
>
>In both the table TMP_TABLE_MERGE and TMP_TABLE_1 the field OBJECT_ID is the
>primary key but in the Explain Plan the table TMP_TABLE_MERGE is acessed in
>full scan mode.
>Do someone knows how can I force the use of the primary keys?
>Thanks
>Pier
>

What percentage of the rows in TMP_TABLE_MERGE match the WHERE condition? If it's greater than 15% or so, it may be more efficient to do a table scan than to use the index. Make sure you run analyze statistics if using CBO also. Received on Sun Jan 05 2003 - 09:24:01 CST

Original text of this message

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