Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with DB_LINK parallel insert as select
Tim Myers wrote:
> The statement below works in about 18 seconds...
>
> insert /*+ append parallel(dst,4) */ into working_raw_marks_test dst
> select /*+ parallel(src,4) */ * from working_raw_marks_at_msup_link src
> /
>
> ...but when I add the predicate as below it will not go parallel and
> takes 4 minutes + i.e:
>
> insert /*+ append parallel(dst,4) */ into working_raw_marks_test dst
> select /*+ parallel(src,4) */ * from working_raw_marks_at_msup_link src
> where src.rowid in ( select row_id from rowid_table )
> /
My guess is that the FTS on the rowid_table and returning that as a "exist set" could be the reason for failing to parallalise.
Try the following:
insert /*+ append parallel(dst,4) */ into working_raw_marks_test dst
select
/*+ parallel(src,4) */
*
from working_raw_marks_at_msup_link src,
rowid_table rid
where src.rowid = rid.row_id
See what the explain plan does with the join. It is bound to try either a NL join or HASH join. If one does not work, force the other one. What is likely needed too, is an unique index on rid.row_id
-- BillyReceived on Fri Jan 17 2003 - 03:03:17 CST