Oracle parallel 并行执行
基本用法
SELECT /*+ PARALLEL(T,4) */ COUNT(*) FROM TABLENAME T;
DML并行
-- 先开启会话允许并行
ALTER SESSION ENABLE PARALLEL DML;
-- 并行插入
INSERT /*+PARALLEL(TABLE1,4) */ INTO TABLE1 SELECT /*+PARALLEL(T1)*/ * FROM TABLENAME T1;
SELECT /*+ PARALLEL(T,4) */ COUNT(*) FROM TABLENAME T;
-- 先开启会话允许并行
ALTER SESSION ENABLE PARALLEL DML;
-- 并行插入
INSERT /*+PARALLEL(TABLE1,4) */ INTO TABLE1 SELECT /*+PARALLEL(T1)*/ * FROM TABLENAME T1;