Oracle 课程-性能优化第9课 并行.pdf





《Oracle 课程-性能优化第9课 并行.pdf》由会员分享,可在线阅读,更多相关《Oracle 课程-性能优化第9课 并行.pdf(41页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、DATAGURU专业数据分析网站 2012.2012.1111.15 15 性能优化性能优化 第第九课九课 并行并行2DATAGURU专业数据分析网站2012.11.122012.11.12法律声明法律声明【声明声明】本视频和幻灯片为炼数成金网络课程的教本视频和幻灯片为炼数成金网络课程的教学资料,所有资料只能在课程内使用,不得在课学资料,所有资料只能在课程内使用,不得在课程以外范围散播,违者将可能被追究法律和经济程以外范围散播,违者将可能被追究法律和经济责任。责任。课程详情访问炼数成金培训网站课程详情访问炼数成金培训网站http:/http:/2013-1-19DATAGURU专业数据分析网站
2、2012.5.282012.5.28什么是并行什么是并行 将一件工作分成很多块,分别由不同的进程来执行,最后将结果合并。2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的应用场景并行的应用场景 OLAP 数据仓库 整块的数据读取操作FTSIFFS 并行执行高效的要素:充足的系统资源待处理的数据分布均匀2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的机制并行的机制用户连接到数据库User启动相应的server process当用户发出并行查询请求时,server porcess变成并行协调进程(qc)。并行进程
3、通过消息和QC进程通信。QC 负责分发任务和接收整合数据。每一个并行进程负责自己分配的工作。2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的机制并行的机制2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的机制并行的机制2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的机制并行的机制2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.282013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的机制并行的机
4、制Parallel Servers Parallel Servers 作了几乎全部的工作作了几乎全部的工作Query CoordinatorQuery CoordinatorIDIDIDIDOperationOperationOperationOperationName Name Name Name TQTQTQTQIN-OUTIN-OUTIN-OUTIN-OUTPQ PQ PQ PQ DistributionDistributionDistributionDistribution0 0SELECT STATEMENTSELECT STATEMENT 1 1 PX COORDINATOR PX
5、 COORDINATOR 2 2 PX SEND QC RANDOM PX SEND QC RANDOM Q1,01Q1,01P-SP-S3 3 HASH JOIN HASH JOIN Q1,01Q1,01PCWPPCWP4 4 PX RECEIVEPX RECEIVE Q1,01Q1,01PCWPPCWP5 5 PX SEND BROADCAST PX SEND BROADCAST Q1,01Q1,01P-PP-PBROADCASTBROADCAST6 6 PX BLOCK ITERATOR PX BLOCK ITERATOR Q1,01Q1,01PCWPPCWP7 7 TABLE ACCE
6、SS FULL TABLE ACCESS FULL CUSTOMERSCUSTOMERSQ1,01Q1,01PCWPPCWP8 8 PX BLOCK ITERATOR PX BLOCK ITERATOR Q1,01Q1,01PCWPPCWP9 9 TABLE ACCESS FULL TABLE ACCESS FULL SALESSALESQ1,01Q1,01PCWPPCWPSELECT c.cust_name,s.purchase_date,s.amountFROM sales s,customers cWHERE s.cust_id=c.cust_id;2013-1-19DATAGURU专业
7、数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划操作操作说明说明PX BLOCK ITERATORThis operation is typically the first step in a parallel pipeline.The BLOCK ITERATOR breaks up the table into chunks that a
8、re processed by each of the parallel servers involved.PX SENDPX SEND operations simply indicate that data is being sent from one parallel process to another.PX RECEIVEPX RECEIVE operations indicate the data being received by one parallel process from another.PX SEND QCThis is a send operation to the
9、 parallel query co-coordinator process.PX COORDINATORThis step simply indicates that the parallel query co-coordinator is receiving the data from the parallel streams and returning it to the SQL statement.2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划RANGE Rows are distributed based on ra
10、nges of values.This is typical when sort operations are parallelized.HASHRows are distributed to parallel query slaves based on a hash of the value concerned.This is suitable for joins and HASH GROUP BY operations and generally ensures a more even distribution of rows than for RANGE operations.RANDO
11、MRows are randomly assigned to parallel query slaves.ROUND ROBINRows are distributed one at a time in a circular fashion,just as you would deal cards in a game of poker.操作操作说明说明2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划2013-1-19DATAGURU专业数据分析网站2012.5.282012.5.28并行的执行计划并行的执行计划操作操作说明说明P
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Oracle 课程-性能优化第9课 并行 课程 性能 优化

限制150内