Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Optimizing query on 2 servers?

Re: Optimizing query on 2 servers?

From: John P. Higgins <jh33378_at_deere.com>
Date: Mon, 08 Jun 1998 11:44:55 -0500
Message-ID: <357C1507.2B10A67C@deere.com>


If you check your explain plan, I think you will see that the join of table1 and table2 is taking place on server2. This means that a lot of rows must be sent over the network from server1 to server2 to be joined.

Try doing the join in a view on server1.

Lily Djuniarti wrote:

> I'm running a query with tables from 2 different servers. I have no problem
> accessing the tables because there are already links for the tables I need
> from, say, server2 to server1.
> The problem is, this query runs forever, so I'll appreciate any idea on how
> to optimize this query.
> The purpose is to retrieve customer data from server1 which are not on
> server2.
> I'm running the query on server2 where table3 is.
>
> SELECT
> FROM table1_at_server1, table2_at_server1
> WHERE ...
> AND table1_at_server1.id = table2_at_server1.id
> AND NOT EXISTS
> (Select 'X'
> from table3
> where
> table3.Customer like (table1_at_server1.first_name||'
> '||table1_at_server1.last_name))
>
> Thanks,
> LD
Received on Mon Jun 08 1998 - 11:44:55 CDT

Original text of this message

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