Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Tuning Query w/database link
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
-- 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
![]() |
![]() |