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: Hostetter, Jay M <JHostetter_at_decommunications.com>
Date: Mon, 9 Aug 2004 10:30:05 -0400
Message-ID: <D67EB7CEECD4334F9C85759227553BBC1CABAD@CL-EXCHANGE1.dande.com>


I had the id number mistyped - when I use a source_id that actually exists, the predicate is pushed to the remote server. If the record doesn't exist, the explain plan on the remote server doesn't show the predicate. However, as I said, this is a simplified version of my actual query. The actual query isn't just joining one "source id" - I used that for testing. So if I continue with my test query and add a range of source_ids (e.g. b.source_id >=3D1000001 and b.source_id <=3D 1009999), Oracle doesn't send the predicate to the remote server. The optimizer seems to think that it's better to a FTS on the view in the remote database. I have tried the in-line views and hints as suggested, but I'm still not having much luck. I might just tell the user to live with this one. Thanks for the replies!

Jay

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Igor Neyman Sent: Friday, August 06, 2004 3:57 PM
To: oracle-l_at_freelists.org
Subject: RE: Tuning Query w/database link

> select * from test_view_at_remotenode a, project_accounting_costs b where

> a.alra_id=3Db.source_id and b.source_id=3D100001;

since a.alra_id=3Db.source_id, could you change your query to:

a.alra_id=3D100001 (instead of b.source_id=3D100001), so:

select * from test_view_at_remotenode a,
 project_accounting_costs b
where a.alra_id=3Db.source_id
 and a.alra_id=3D100001;=20

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

**DISCLAIMER

This e-mail message and any files transmitted with it are intended for the =
use of the individual or entity to which they are addressed and may contain=
 information that is privileged, proprietary and confidential. If you are n=
ot the intended recipient, you may not use, copy or disclose to anyone the =
message or any information contained in the message. If you have received t=
his communication in error, please notify the sender and delete this e-mail=
 message. The contents do not represent the opinion of D&E except to the ex=
tent that it relates to their official business.

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 Mon Aug 09 2004 - 09:51:28 CDT

Original text of this message

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