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: Tuning Query w/database link

Re: Tuning Query w/database link

From: Michael Thomas <mhthomas_at_yahoo.com>
Date: Fri, 6 Aug 2004 15:16:31 -0700 (PDT)
Message-ID: <20040806221631.3475.qmail@web50606.mail.yahoo.com>


Hi,

Have you tried subqueries and the PUSH_SUBQ (or its converse) hint? The idea being to either get/push the least data across the link from either side. E.g.

One simple example (push a few local rows) is:

SELECT /* PUSH_SUBQ */ r.col1, r.col2, r.col3 FROM tableA_at_remote_link r
WHERE (r.col1, r.col2) in (
  SELECT l.col4, l.col5
  FROM local_tableB l
  WHERE l.col6 = 'ABC' )
;

(PS: Watch out for possible NULLs)

I have used this technique many times with success.

Regards,

Mike Thomas                 



Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail

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

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Aug 06 2004 - 17:12:20 CDT

Original text of this message

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