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: Long running SQL Problem?

Re: Long running SQL Problem?

From: <tday6_at_csc.com>
Date: Wed, 27 Mar 2002 05:48:26 -0800
Message-ID: <F001.00434B2F.20020327054826@fatcity.com>

Try something like

select a.col1||a.col2, b.col3||b.col4 from table1 a, table2 b
where a.col1||a.col2 = b.col3||b.col4 (+))
WHERE b.col3||b.col4 IS NULL;

I think that works.

                                                                                           
                    Denham Eva                                                             
                    <EvaD                To:     Multiple recipients of list ORACLE-L      
                    @TFMC.co.za>         <ORACLE-L_at_fatcity.com>                            
                    Sent by: root        cc:                                               
                                         Subject:     Long running SQL Problem?            
                                                                                           
                    03/27/2002                                                             
                    03:53 AM                                                               
                    Please                                                                 
                    respond to                                                             
                    ORACLE-L                                                               
                                                                                           
                                                                                           






Hello List

Is there anyone who can give me a solution to this problem. It is a sql that runs forever and I eventually have to kill it, both tables are large 500000 + rows.
Is there perhaps a quicker more effecient way of doing this.

SELECT col1,col2
FROM Table_1
WHERE (col1,col2) NOT IN (SELECT col3,col4 FROM Table_2);

TIA
Denham Eva
Oracle DBA

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: tday6_at_csc.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 Mar 27 2002 - 07:48:26 CST

Original text of this message

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