A DML operation cannot be parallelized if it is in a distributed transaction or if the DML or the query operation is against a remote object.
This section contains several examples of distributed transaction processing.
Example 1 Distributed Transaction ParallelizationIn this example, the DML statement queries a remote object:
INSERT /* APPEND PARALLEL (t3,2) */ INTO t3 SELECT * FROM t4@dblink;
The query operation is executed serially without notification because it references a remote object.
test之后,发现t4@dblink的query可以parallel,insert append无法parallel,就算不是Distributed Transaction 也不会parallel
Example 2 Distributed Transaction ParallelizationIn this example, the DML operation is applied to a remote object:
DELETE /*+ PARALLEL (t1, 2) */ FROM t1@dblink;
The DELETE operation is not parallelized because it references a remote object.
test:DELETE /*+ PARALLEL (t1, 2) */操作会在@dblink端parallel
Example 3 Distributed Transaction Parallelization
In this example, the DML operation is in a distributed transaction:
SELECT * FROM t1@dblink; DELETE /*+ PARALLEL (t2,2) */ FROM t2; COMMIT;
test:DELETE /*+ PARALLEL (t2,2) */操作会parallel
不知道官网上说的哪个版本,我的test是在10.2.0.4上做的
The DELETE operation is not parallelized because it occurs in a distributed transaction (which is started by the SELECT statement).
NOTE:Distributed Transaction 支持direct-path
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16158219/viewspace-580630/ ,如需转载,请注明出处,否则将追究法律责任。