Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with DB_LINK parallel insert as select

Re: Help with DB_LINK parallel insert as select

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 17 Jan 2003 09:03:17 +0000
Message-ID: <b089rh$gua$1@ctb-nnrp2.saix.net>


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

--
Billy
Received on Fri Jan 17 2003 - 03:03:17 CST

Original text of this message

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