RE: is it possible to execute _ALL_ of a query remotely then fetc h the results over a db link?

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: "'identd@xxxxxxxxx'" <identd@xxxxxxxxx>, oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 10 Feb 2005 08:19:24 -0500

Marc,

Create a view on the "b" database joining all of the tables in your query
and call that view from the "a" machine.  This will force the join to be
performed on the "b" machine.

My experience is that Oracle brings all of the data from each table to the
"a" machine and performs a join locally.  This really doesn't cut it.

Good Luck

Tom

-----Original Message-----
From: Marc Slemko [mailto:identd@xxxxxxxxx] 
Sent: Thursday, February 10, 2005 5:14 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: is it possible to execute _ALL_ of a query remotely then fetch the
results over a db link?

Ok, I've searched around a bunch.  Found a bunch of threads on
metalink with no real answer other than hacks such as creating a view
on the remote server and selecting from that, which are an inane
solution.

My question is this: I have two Oracle 10g boxes, A and B.  I create a
db link from A to B.  I have a select query I want to run from A, and
every table referenced in the query lives on B.  How can I force
Oracle to just send the whole thing to B and then get the results?

The particulars of the query really shouldn't matter... as long as
every table involved is on B.  The DRIVING_SITE hint doesn't do it. 
Using a collocated inline views (as the Oracle docs call it) doesn't
do it.   Using NO_MERGE doesn't seem to do it.

Sure, the select query is slightly hairy.  But it is all accessing
data on B, scanning through a bunch of data, and returning 10 rows or
so.

I'm just looking for confirmation about if I am missing some easy
answer here, or if it really has to be hacked together on the
specifics of each query.

What we are really looking for here is the ability to access a data
warehouse (ie. complex queries, lots of joins, but few rows returned)
remotely over a database link to allow execution from something like
htmldb living on a remote server without having to worry about hand
tuning each query for the remote execution.

Thanks.
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l

Other related posts: