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: DB Links

RE: DB Links

From: Vergara, Michael (TEM) <mvergara_at_guidant.com>
Date: Wed, 22 Sep 2004 15:14:05 -0700
Message-ID: <791D0E1ECDECD04D89205F33806FC38701E921DE@temmse06.tem.guidant.com>


Kevin:

I don't know the direct answer, but I found the same solution. I had a query that did a join of two tables in a local database and then inserted into a remote db table. Sort of...

insert into table_at_remote
select a.col1, b.col1
from tab1 a, tab2=20
where a.col2 =3D b.col3

...and it took for-blinking-ever. I created a global temporary table, inserted into that, and then inserted from the GTEM table to the remote table and processing dropped to mere moments.

It was a puzzlement to me because the work (ie: the join) I=20 presumed was being done on the local machine prior to the=20 insert to the remote table. My fix was a late-night-oh-my- doG-fix-the-problem solution and I never got the time to go back and find the why.

Cheers,
Mike

-----Original Message-----

From: Kevin Lange [mailto:klange_at_ppoone.com] Sent: Wednesday, September 22, 2004 2:44 PM To: Oracle-L (E-mail)
Subject: DB Links

Does anyone happen to have a reasonable explaination on what happens to = a
query when you try to access tables accross db_links ?? Does it still = use
the indexes on the remote machine ?? Does it bring all the data locally into temp tables ??

Any info will do. Book names .... Actual explainations ... directions = to
web sites ... Anything.

We have a procedure, a fairly complex procedure, that takes about 13 = hours
to run when it is ran against tables that exist accross a DB link. But, when we copy all the tables locally, it runs in about an hour. We would like to try and find a way to fix this. But first, I need to know = exactly
what is happening when the cursor access those linked tables.

Any help would be appreciated.

Kevin
--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Wed Sep 22 2004 - 17:09:39 CDT

Original text of this message

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