[Oracle] Create table as 速度測試nologging+parallel
SQL> show user
USER 為 "BRUCE"
SQL> select count(*) from bruce;
COUNT(*)
----------
83324928
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
SQL> create table bruce1 as select * from bruce;
表已建立。
已用時間: 00: 07: 46.42
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
SQL> create table bruce2 nologging as select * from bruce;
表已建立。
已用時間: 00: 02: 31.71
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
SQL> create table bruce3 tablespace bruce nologging parallel 2
2 as
3 select * from bruce;
表已建立。
已用時間: 00: 00: 59.93
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
BRUCE3 8.88317871
SQL> create table bruce4 tablespace bruce nologging parallel 2
2 as
3 select /*+parallel(a 2)*/ * from bruce a;
表已建立。
已用時間: 00: 00: 59.32
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
BRUCE3 8.88317871
BRUCE4 8.88317871
--------------------------------
普通insert | 07: 46.42
nologging | 02: 31.71
nologging + parallel | 00: 59.93
nologging + parallel(包括select) | 00: 59.32
(1)對於將近9G的table,create table使用 nologging + parallel速度會有很大的提升,並且沒有log產生(很少).
(2)在select中也加上parallel好像作用不大,可能是電腦的cpu核數不夠,有機會找臺server測試一下.
(3)執行完成之後,切記將 table的logging和degree屬性改回來
USER 為 "BRUCE"
SQL> select count(*) from bruce;
COUNT(*)
----------
83324928
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
SQL> create table bruce1 as select * from bruce;
表已建立。
已用時間: 00: 07: 46.42
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
SQL> create table bruce2 nologging as select * from bruce;
表已建立。
已用時間: 00: 02: 31.71
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
SQL> create table bruce3 tablespace bruce nologging parallel 2
2 as
3 select * from bruce;
表已建立。
已用時間: 00: 00: 59.93
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
BRUCE3 8.88317871
SQL> create table bruce4 tablespace bruce nologging parallel 2
2 as
3 select /*+parallel(a 2)*/ * from bruce a;
表已建立。
已用時間: 00: 00: 59.32
SQL> select segment_name,bytes/1024/1024/1024 from user_segments;
SEGMENT_NAME BYTES/1024/1024/1024
-------------------- --------------------
BRUCE 8.875
BRUCE1 8.9375
BRUCE2 8.88769531
BRUCE3 8.88317871
BRUCE4 8.88317871
--------------------------------
普通insert | 07: 46.42
nologging | 02: 31.71
nologging + parallel | 00: 59.93
nologging + parallel(包括select) | 00: 59.32
(1)對於將近9G的table,create table使用 nologging + parallel速度會有很大的提升,並且沒有log產生(很少).
(2)在select中也加上parallel好像作用不大,可能是電腦的cpu核數不夠,有機會找臺server測試一下.
(3)執行完成之後,切記將 table的logging和degree屬性改回來
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2126898/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [Oracle] Create index速度測試nologging+parallelOracleIndexParallel
- [Oracle] Insert into速度測試nologging+parallelOracleParallel
- Oracle Create Table as SelectOracle
- oracle10g_create tablespace_測試_1Oracle
- oracle10g_create tablespace_測試_2Oracle
- VBA從Excel中生成Oracle create tableExcelOracle
- use azure data studio to create external table for oracleOracle
- 有關oracle external table的一點測試。Oracle
- oracle10g_alter table_測試3Oracle
- 【MYSQL備庫恢復速度測試 半同步速度測試】MySql
- create table of mysql databaseMySqlDatabase
- oracle 19c 無法create table解決Oracle
- create a partition table using a exsit table
- oracle create database link_資料庫連結測試OracleDatabase資料庫
- oracle10.2.0.4_create table_constraint_indexOracleAIIndex
- oracle11gR2 table compress一點測試Oracle
- ORACLE的Copy命令和create table,insert into的比較Oracle
- create table if not exists Waiting for table metadata lockAI
- oracle create table官方手冊如何快速檢視學習方法Oracle
- MySQL5.6 create table原理分析MySql
- sqlserver不能直接create table as select ......SQLServer
- create table進階學習(一)
- create table進階學習(三)
- create table進階學習(四)
- 如何測試伺服器的速度伺服器
- 伺服器的速度如何測試伺服器
- JavaScript表格元件載入速度測試JavaScript元件
- oracle中用Create Table建立表時,Storage中引數的含義!Oracle
- Angular單元測試如何只執行指定的測試用例,提高測試速度Angular
- hdparm 測試硬碟讀寫速度I/O硬碟
- MySQL的create table as 與 like區別MySql
- create table進階學習系列(八)
- create table進階學習系列(五)
- create table進階學習系列(七)
- create table進階學習系列(九)
- CREATE TABLE AS SELECT(CAST)(二)-ConceptAST
- GoldenGate "Error mapping from table.a to table.a"錯誤測試GoErrorAPP
- 無程式碼的啟動速度測試 with stagesepx