Parallel Execution,主要应用与OLAP系统中提高执行效率。PX的执行机制是当发起一个并行操作时,创建一个进程如QC,协调并行服务器进程的信息传递,并行协调进程将需要操作的数据集按照并行执行数分成若干单元,并将数据单元分别分给并行服务器进程进行处理,处理完毕后,将结果集传递给并行协调进程,并行协调进程将结果集汇总反馈给用户。
并行服务器进程数量
Oracle启动是会根据参数文件中的parallel_min_servers参数创建进程数量,当并行服务器进程不足时,再创建新的并行服务器进程,最大分配数量为parallel_max_servers。至于一条语句的使用多少并行服务器进程,取决于该语句执行的操作,查询后需要排序,则使用的数量需要乘2,以此类推。
在一个系统中出现严重的等待事件"PX Deq Credit: send blkd",在ID 271767.1中,将该事件有时称为是一个正常的等待事件,需要根据情况具体分析。
This is considered as idle wait event.You should investigate the sender (decode the senderid).In same cases it is normal that we see high waits on "PX Deq Credit: send blkd".
An example: We do a select from a large table in parallel.select /*+ parallel(sales, 10) +/ * from sales)
Than you see a lot of waits for "PX Deq Credit: send blkd" in the slave traces. All slaves wait for the QC to get back the credit bit. The QC can not dequeue fast enough the rows from the slaves, beause there are to many slaves that send rows back to the QC. In this case it is normal。
Parallel Query Wait Events (文档 ID 191103.1)
WAITEVENT: "PX Deq Credit: send blkd" (文档 ID 271767.1)
关于并行执行(parallel executing)的认识,布布扣,bubuko.com