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: Interesting Distributed UNION Question

Re: Interesting Distributed UNION Question

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 29 Oct 2004 18:10:53 -0700
Message-ID: <1099098592.314524@yasure>


Roger Corman wrote:

>>Well, if the SOURCE column isn't needed, leave it out and your problem is
>>solved. A UNION eliminates all redundant rows, so you will only retrive
>>results from either A or B, never from both.

>
>
>
> Thanks for the reply but you don't understand the question. I know
> that the UNION operation filters redundant rows (the question is not
> related to how UNION functions). BUT, filtering rows implies a trip
> to both Servers which is exactly what I am trying to avoid. I am
> looking for a way to provide optimizer hints within the query so that
> Oracle will only query 1 server and not both, thus the use of the
> SOURCE column.
>
> I have looked at the execution plan which clearly shows a trip to both
> servers when selecting from VIEW where SOURCE = 'A'.
>
> Back to the question... Is it possible to restrict Oracle from making
> a trip to both servers using the SOURCE column of the VIEW?

The answer is that there is no way to do what you want that will work all of the time. And the reason is that if you know where the answer is you should write logic to query it. If you don't then 50% of the time you will guess incorrectly.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Oct 29 2004 - 20:10:53 CDT

Original text of this message

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