Force Operation on Remote Database
I have a 3 part UNION ALL query, each part of which runs against a different DB via DB links (the 1st part runs against the local DB).
When I run each part that accesses the remote DB, the query runs totally remotely and runs in under 5 seconds.
However, when I combine them into one query, I see REMOTE inside of a nested loop structure, and the query takes around 20 minutes. No part of the query depends on anything on the local machine; I've had that reviewed. (I also have about 20 other queries with the same structure that generate correct explain plans).
I have verified that the subquery can and should run totally against the remote DB.
Is there any way to force the query to be executed remotely?
The portion of the explain plan looks like this:
SORT GROUP BY
..nested loops
....nested loops
......remote
......remote
....remote
..remote