Parallel操作測試
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production
Elapsed: 00:00:00.03
SQL>
SQL> select degree from user_tables where table_name = upper('t_service_route');
SQL>
SQL> select degree from user_tables where table_name = upper('t_service_route');
DEGREE
--------------------
1
--------------------
1
SQL> set timing on
SQL> set line 1000
SQL> explain plan for
2 select count(1) from t_service_route;
SQL> explain plan for
2 select count(1) from t_service_route;
Explained.
Elapsed: 00:00:00.01
SQL> select * from table(dbms_xplan.display);
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------
Plan hash value: 572639962
--------------------------------------------------------------------------------------------------
Plan hash value: 572639962
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 23766 (2)| 00:05:33 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | INDEX FAST FULL SCAN| PK_T_SERVICE_ROUTE | 33M| 23766 (2)| 00:05:33 |
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 23766 (2)| 00:05:33 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | INDEX FAST FULL SCAN| PK_T_SERVICE_ROUTE | 33M| 23766 (2)| 00:05:33 |
------------------------------------------------------------------------------------
9 rows selected.
Elapsed: 00:00:00.03
SQL>
SQL> alter table t_service_route parallel; --啟用parallel
SQL>
SQL> alter table t_service_route parallel; --啟用parallel
Table altered.
Elapsed: 00:00:00.02
SQL> select degree from user_tables where table_name = upper('t_service_route');
SQL> select degree from user_tables where table_name = upper('t_service_route');
DEGREE
--------------------
DEFAULT
--------------------
DEFAULT
Elapsed: 00:00:00.02
SQL>
SQL> explain plan for
2 select count(1) from t_service_route;
SQL>
SQL> explain plan for
2 select count(1) from t_service_route;
Explained.
Elapsed: 00:00:00.01
SQL> select * from table(dbms_xplan.display);
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------
Plan hash value: 213106263
------------------------------------------------------------------------------------------------------------------------
Plan hash value: 213106263
---------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
---------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 3210 (1)| 00:00:45 | | | |
| 1 | SORT AGGREGATE | | 1 | | | | | |
| 2 | PX COORDINATOR | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | | | Q1,00 | P->S | QC (RAND) |
| 4 | SORT AGGREGATE | | 1 | | | Q1,00 | PCWP | |
| 5 | PX BLOCK ITERATOR | | 33M| 3210 (1)| 00:00:45 | Q1,00 | PCWC | |
| Id | Operation | Name | Rows | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
---------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 3210 (1)| 00:00:45 | | | |
| 1 | SORT AGGREGATE | | 1 | | | | | |
| 2 | PX COORDINATOR | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | | | Q1,00 | P->S | QC (RAND) |
| 4 | SORT AGGREGATE | | 1 | | | Q1,00 | PCWP | |
| 5 | PX BLOCK ITERATOR | | 33M| 3210 (1)| 00:00:45 | Q1,00 | PCWC | |
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------
| 6 | TABLE ACCESS FULL| T_SERVICE_ROUTE | 33M| 3210 (1)| 00:00:45 | Q1,00 | PCWP | |
---------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
| 6 | TABLE ACCESS FULL| T_SERVICE_ROUTE | 33M| 3210 (1)| 00:00:45 | Q1,00 | PCWP | |
---------------------------------------------------------------------------------------------------------------
13 rows selected.
Elapsed: 00:00:00.08
SQL>
SQL>
---一個並行建立索引的例子:
SQL> drop index grade_name;
Index dropped.
Elapsed: 00:00:00.08
SQL> create index grade_name on addr(grade,name);
SQL> create index grade_name on addr(grade,name);
Index created.
Elapsed: 00:00:36.28
SQL> drop index grade_name;
SQL> drop index grade_name;
Index dropped.
Elapsed: 00:00:00.04
SQL> create index grade_name on addr(grade,name) parallel;
SQL> create index grade_name on addr(grade,name) parallel;
Index created.
Elapsed: 00:00:15.83 --速度快了一倍
SQL>
SQL>
SQL> select degree from user_indexes where index_name='GRADE_NAME';
DEGREE
----------------------------------------
DEFAULT
----------------------------------------
DEFAULT
Elapsed: 00:00:00.03
SQL>
SQL>
並行的相關view:
gv$px_process
gv$px_session
gv$px_sesstat
gv$px_session
gv$px_sesstat
SQL> select PDML_ENABLED,PDML_STATUS,PDDL_STATUS from v$session where rownum=1;
PDM PDML_STA PDDL_STA
--- -------- --------
NO DISABLED ENABLED
--- -------- --------
NO DISABLED ENABLED
Elapsed: 00:00:00.02
預設PDDL是開啟的
PDML 預設是關閉的(alter session enable parallel dml; alter session disable parallel dml;)
delete、update、merge的parallel執行僅只能在分割槽表上。
Parallel Query 預設是關閉的
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195110/viewspace-684457/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [Oracle] Create table as 速度測試nologging+parallelOracleParallel
- [Oracle] Insert into速度測試nologging+parallelOracleParallel
- [Oracle] Create index速度測試nologging+parallelOracleIndexParallel
- fast_start_parallel_rollback引數的一點測試ASTParallel
- lua陣列操作效能測試陣列
- python操作oracle小測試PythonOracle
- IOT(Interoperability TEST)互操作測試
- Oracle 審計和測試操作Oracle
- K8S 操作測試K8S
- Selenium操作:測試form表單ORM
- fixtrue基礎之測試初始化及測試後清理操作
- 測試測試測試測試測試測試
- Oracle並行操作——並行查詢(Parallel Query)Oracle並行Parallel
- 滲透測試什麼?滲透測試具體操作流程是什麼
- 滲透測試工具Burpsuite操作教程UI
- 退出、測試、判斷及操作符 shell
- 利用goldengate進行同步操作測試Go
- java操作Oracle效能測試小工具(急!!!!)JavaOracle
- ltp測試操作步詳解(壓力測試網站最詳、下載、使用)網站
- oracle hint_no_parallel_no_parallel_indexOracleParallelIndex
- oracle hint_parallel_parallel_indexOracleParallelIndex
- 不同insert操作產生的undo的測試
- 測試開發之系統篇-Docker常用操作Docker
- windows下openldap的安裝與java操作測試WindowsLDAJava
- oracle11gR2 RAC 環境測試修改節點VIP的測試操作記錄Oracle
- parallel並行度的相關操作、概念、引數解釋Parallel並行
- Java8中的流操作-基本使用&效能測試Java
- mysql的DDL操作對業務產生影響測試MySql
- 【操作教程】利用YCSB測試巨杉資料庫效能資料庫
- 高階複製-5、測試是否可同步DML操作
- Tasks in parallelParallel
- Parallel DMLParallel
- App測試、Web測試和介面測試一般測試流程APPWeb
- 介面測試測試流程
- Flutter 學習之路 - 測試(單元測試,Widget 測試,整合測試)Flutter
- 介面測試,負載測試,併發測試,壓力測試區別負載
- 黑盒測試、白盒測試、單元測試、整合測試、系統測試、驗收測試的區別與聯絡...
- 測試CMS同步測試CMS同步測試CMS同步