Understanding Parallel Execution Plan
The execution plan:
SQL_ID fjwcnz05c5ugv, child number 0
-------------------------------------
select /*+ PARALLEL(4) */ COUNT(order_id), CUSTOMER_ID from orders
GROUP BY CUSTOMER_ID
Plan hash value: 1771920570
--------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | | 911 (100)| | | | |
| 1 | PX COORDINATOR | | | | | | | | | |
| 2 | PX SEND QC (RANDOM) | :TQ10001 | 100K| 984K| | 911 (1)| 00:00:01 | Q1,01 | P->S | QC (RAND) |
| 3 | HASH GROUP BY | | 100K| 984K| 19M| 911 (1)| 00:00:01 | Q1,01 | PCWP | |
| 4 | PX RECEIVE | | 100K| 984K| | 911 (1)| 00:00:01 | Q1,01 | PCWP | |
| 5 | PX SEND HASH | :TQ10000 | 100K| 984K| | 911 (1)| 00:00:01 | Q1,00 | P->P | HASH |
| 6 | HASH GROUP BY | | 100K| 984K| 19M| 911 (1)| 00:00:01 | Q1,00 | PCWP | |
| 7 | PX BLOCK ITERATOR | | 1000K| 9765K| | 295 (1)| 00:00:01 | Q1,00 | PCWC | |
|* 8 | TABLE ACCESS FULL| ORDERS | 1000K| 9765K| | 295 (1)| 00:00:01 | Q1,00 | PCWP | |
--------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
8 - access(:Z>=:Z AND :Z<=:Z)
Note
-----
- Degree of Parallelism is 4 because of hint
1. Operation
HASH GROUP BY : Starting from 10g, Oracle uses a hash algorithm to "group by" instead of the sort algorith, it's CPU cost is lower.
PX CORDINATOR : The query coordinator.
PX SEND QC(RANDOM) : Parallel sends to Query Coordinator in random order.
PX BLOCK ITERATOR : Parallism graules in block
PX RECEIVE : PX receieves.
PX SEND HASH : PX sends in Hash
1. TQ
Each set of parallel processes gets a table queue, so this column indicates which set of parallel processes implement the activity specified in the "Operation" column.
Q1,00 and Q1,01 indicate that there're two sets of process servers.
2. IN-OUT
PCWP: Parallel Combine with Parent.
PCWC: Parallel Combine wth Child.
P->S: Parallel to Serial.
S->P: Serial to Parallel.
P->P: Parallel to Parallel. Inter-operation parallism.
3. PQ Distrib
QC(Rand): All producers send their rows to the query coordinator in random order.
HASH: A hash function is used to determine which consumer a producer sends a row to. This is useful for hash joins. Q1,00 are producers, while Q1,01 consumers.
Range: Producers send rows in a different range to different consumers. This is useful for an ORDER BY operation.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/638844/viewspace-773002/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- explain plan VS execution planAI
- Oracle Parallel ExecutionOracleParallel
- oracle execution planOracle
- MySQL 8.0 Reference Manual(讀書筆記59節--Understanding the Query Execution Plan(2))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記58節--Understanding the Query Execution Plan(1))MySql筆記
- Parallel Execution of SQL StatementsParallelSQL
- Explain for the Statistics of Execution PlanAI
- 聊聊flink的Parallel ExecutionParallel
- Oracle's Parallel Execution Features(zt)OracleParallel
- 【Oracle】Master Note for Parallel Execution Wait EventsOracleASTParallelAI
- SAP ABAP SQL的execution plan和cacheSQL
- oracle 9i啟用Execution PlanOracle
- Retrieve SQL and Execution Plan from AWR SnapshotsSQL
- Using Parallel Execution (文件 ID 203238.1)Parallel
- 【SQL】Using Oracle's Parallel Execution FeaturesSQLOracleParallel
- Oracle資料庫並行機制Parallel ExecutionOracle資料庫並行Parallel
- zt_Using Oracle's Parallel Execution FeaturesOracleParallel
- 11gR2 新特性之—In-Memory Parallel executionParallel
- Master Note Parallel Execution Wait Events [ID 1097154.1]ASTParallelAI
- parallel_execution_message_size 對 恢復速度的影響Parallel
- 適當採用Histogram 讓Oracle達成最優Execution PlanHistogramOracle
- zt_parallel_execution_message_size 對 rman recover恢復速度的影響Parallel
- zt_oracle11g sql baseline與sql execution plan執行計劃OracleSQL
- oracle10g parallel execution並行執行與大池large pool使用之四OracleParallel並行
- Understanding Service Types
- oracle hint_no_parallel_no_parallel_indexOracleParallelIndex
- oracle hint_parallel_parallel_indexOracleParallelIndex
- Understanding JSON SchemaJSON
- Understanding Delegated JavaScript EventsJavaScript
- [翻譯] Understanding deletedelete
- Understanding RabbitMQ Exchange & QueueMQ
- Understanding Initialization Parameters (85)
- Tasks in parallelParallel
- Parallel DMLParallel
- Explain PlanAI
- Understanding Linux CPU statsLinux
- Understanding React `setState` 翻譯React
- Understanding the CREATE DATABASE Statement (69)Database