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: Improve query performance

Re: Improve query performance

From: Noel <tbal_at_go2.pl>
Date: Tue, 9 Dec 2003 11:43:07 -0000
Message-ID: <br48rj$22b$1@inews.gazeta.pl>

Uzytkownik "Ursula Lee" <ursula.lee_at_thales-is.com> napisal w wiadomosci news:br468d$hua20_at_imsp212.netvigator.com...

> 1. How can I improve the query performance? Any suggestion on how to
> replace 'NOT EXISTS' in the following query?

Yikes! I'm not even close to rebuild it with set operation. But that's what i would do.

I give a simple example:

 SELECT *
    FROM TABLEA A

     WHERE NOT EXISTS
     (
     SELECT 1
          FROM TABLEB B
       WHERE B.ID = A.ID

   );

might be replaced with:

SELECT *
  FROM TABLEA
 WHERE ID IN SELECT A.ID ID
      FROM TABLEA
  MINUS
 SELECT B.ID
     FROM TABLEB
 );

Sorry, but it would be take ages me to rebuild your query. I have to do some views first.

--
Noel
Received on Tue Dec 09 2003 - 05:43:07 CST

Original text of this message

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