Re: performance question

From: Pier Gaetano Novara <pgaetanoNoSpam_at_csc.com>
Date: Sat, 4 Jan 2003 18:17:38 +0100
Message-ID: <av74vg$oid$1_at_lore.csc.com>


SQL> DESC TMP_TABLE_MERGE;

 Nome                                      Nullo?   Tipe
 ----------------------------------------- -------- --------------------
 OBJECT_ID                                 NOT NULL CHAR(32)
 IS_OWNER                                           CHAR(1)
 PL_OBJECT_ID                                       CHAR(32)
 ADM_OBJECT_ID                                      CHAR(32)
 AMNDMNT_NMBR                                       NUMBER(4)
 FK_CONTAINER                                       CHAR(32)
 P_FK_SHARED_OBJECT                                 CHAR(32)
 A_FK_SHARED_OBJECT                                 CHAR(32)
 FK_EVENT_CRE                                       CHAR(32)
 FK_EVENT_REV                                       CHAR(32)

 Nome                                      Nullo?   Tipe
 ----------------------------------------- -------- --------------------
 OBJECT_ID                                 NOT NULL CHAR(32)
 FK_CONTAINER                                       CHAR(32)



"Ban Spam" <ban-spam_at_operamail.com> wrote in message news:Xns92F9583941291SunnySD_at_68.6.19.6...
> "Pier Gaetano Novara" <pgaetanoNoSpam_at_csc.com> wrote in
> news:av6nnu$h5a$1_at_lore.csc.com:
>
> > 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
> >
> >
> >
>
> Are the two fields define EXACTLY the same datatype & length/precision?
> Please do
> DESC TMP_TABLE_MERGE
> DESC TMP_TABLE_1
> and post the results

Here the result:

DESC TMP_TABLE_MERGE

 Name                                      Null?    Type
 ----------------------------------------- -------- --------------------
 OBJECT_ID                                 NOT NULL CHAR(32)
 IS_OWNER                                           CHAR(1)
 PL_OBJECT_ID                                       CHAR(32)
 ADM_OBJECT_ID                                      CHAR(32)
 AMNDMNT_NMBR                                       NUMBER(4)
 FK_CONTAINER                                       CHAR(32)
 P_FK_SHARED_OBJECT                                 CHAR(32)
 A_FK_SHARED_OBJECT                                 CHAR(32)
 FK_EVENT_CRE                                       CHAR(32)
 FK_EVENT_REV                                       CHAR(32)

DESC TMP_TABLE_1
 Name                                      Null?    Type
 ----------------------------------------- -------- --------------------
 OBJECT_ID                                 NOT NULL CHAR(32)
 FK_CONTAINER                                       CHAR(32)
Received on Sat Jan 04 2003 - 18:17:38 CET

Original text of this message