Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Optimizing query on 2 servers?
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:24:33 CDT