我们如何在 Oracle Merge 语句中使用并行 (10) 提示

我们如何在oracle合并语句中使用并行(10)提示?,我对提示有点陌生,想知道这是否可以用于合并语句?

How can we use parallel (10) hints in the oracle merge statement? , I am a bit new to hints and would like to know if this can be done for merge statements?

推荐答案

如何?像这样:

SQL> alter session enable parallel dml;

Session altered.

SQL> merge /*+ parallel(10) */ into emp e
  2    using dept d
  3    on (d.deptno = e.deptno)
  4    when matched then update set
  5      e.comm = e.comm * 1;

14 rows merged.

SQL>

PARALLEL 提示将启用读并行,但要同时启用写并行,您需要运行上述 ALTER SESSION 命令或使用提示 /*+ ENABLE_PARALLEL_DML */.

The PARALLEL hint will enable read-parallelism, but to also enable write-parallelism you will need to either run the above ALTER SESSION command or use the hint /*+ ENABLE_PARALLEL_DML */.

相关文章