SQL> show parameter parallel_min
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
parallel_min_percent integer 0
SQL> show parameter parallel_max
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
parallel_max_servers integer 960
SQL> select * from v$px_process_sysstat;
STATISTIC VALUE
------------------------------------------------------------ ----------
Servers In Use 0
Servers Available 64
Servers Started 308
Servers Shutdown 244
Servers Highwater 64
Servers Cleaned Up 0
Server Sessions 226823
Memory Chunks Allocated 105
Memory Chunks Freed 87
Memory Chunks Current 18
Memory Chunks HWM 23
STATISTIC VALUE
------------------------------------------------------------ ----------
Buffers Allocated 1771708
Buffers Freed 1771708
Buffers Current 0
Buffers HWM 1566
15 rows selected.
Servers In Use: 正在使用的并行进程的数量
Servers Available:可用的并行进程的数量
执行SQL:
SQL> select /*+ parallel(a 8)*/ count(*) from T_PM_ACCT_DTL a;
对应8个进程
祖宗进程为384
那么加上group by 和order by呢?
SQL> select /*+ parallel(a 8)*/ count(*) from T_PM_ACCT_DTL a group by a.data_date order by a.data_date;
可以看到已经使用了16个