Home  >  Article  >  Database  >  Oracle Study之案例--Oracle Parallel Execution(并行执行)

Oracle Study之案例--Oracle Parallel Execution(并行执行)

WBOY
WBOYOriginal
2016-06-07 16:42:571043browse

OracleStudy之案例--OracleParallelExecution(并行执行)并行(Parallel)和OLAP系统并行的实现机制是:首先,Oracle会创建一个进程用于协调并行服务进程之间的信


案例分析:

查看并行服务执行计划

16:13:07 SCOTT@ test1 >create table emp2 as select * from emp; Table created. 16:13:26 SCOTT@ test1 >alter table emp2 parallel 2; Table altered. 16:13:37 SCOTT@ test1 >set autotrace trace 16:14:20 SCOTT@ test1 >select sum(sal) from emp2 group by deptno Elapsed: 00:00:00.01 Execution Plan ---------------------------------------------------------- Plan hash value: 3939201228 ------------------------------------------------------------------------------------------------------------------ | Id  | Operation                | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib | ------------------------------------------------------------------------------------------------------------------ |   0 | SELECT STATEMENT         |          |    14 |   364 |     3  (34)| 00:00:01 |        |      |            | |   1 |  PX COORDINATOR          |          |       |       |            |          |        |      |            | |   2 |   PX SEND QC (RANDOM)    | :TQ10001 |    14 |   364 |     3  (34)| 00:00:01 |  Q1,01 | P->S | QC (RAND)  | |   3 |    HASH GROUP BY         |          |    14 |   364 |     3  (34)| 00:00:01 |  Q1,01 | PCWP |            | |   4 |     PX RECEIVE           |          |    14 |   364 |     3  (34)| 00:00:01 |  Q1,01 | PCWP |            | |   5 |      PX SEND HASH        | :TQ10000 |    14 |   364 |     3  (34)| 00:00:01 |  Q1,00 | P->P | HASH       | |   6 |       HASH GROUP BY      |          |    14 |   364 |     3  (34)| 00:00:01 |  Q1,00 | PCWP |            | |   7 |        PX BLOCK ITERATOR |          |    14 |   364 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            | |   8 |         TABLE ACCESS FULL| EMP2     |    14 |   364 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            | ------------------------------------------------------------------------------------------------------------------ Note -----    - dynamic sampling used for this statement (level=2) Statistics ----------------------------------------------------------          12  recursive calls           0  db block gets           6  consistent gets           0  physical reads           0  redo size         471  bytes sent via SQL*Net to client         415  bytes received via SQL*Net from client           2  SQL*Net roundtrips to/from client           0  sorts (memory)           0  sorts (disk)           3  rows processed
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn