Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query with dblink runs slow
Try using the "DRIVING_SITE" hint to the CBO. It can make a huge
difference. This is documented somewhere in Oracle's chapters on
distributed databases.
Select /*+DRIVING_SITE(remote_large_table) */
col1, col2
from
remote_large_table,
local_table
where ....
NetComrade wrote:
> Queries DO use indexes, but require a lot of tuning. > Somtimes you have to do a lot of nested queries, but that doesn't > always produce the needed results. In most cases we try the nested > query to return what's needed from the remote db, and than join it to > local tables. > Additionally, queries that execute entirely on the remote site, should > have the same explain plan as they're on local. >