歸檔模式下的 nologging和/*+ append */引數 效能測試
今天新安裝配置了一臺oracle資料庫伺服器,對在歸檔模式下的資料處理進行了測試。分別執行如下語句
create table test as select * from dba_objects;
或者
create table test nologging as select * from dba_objects;
insert into test select * from test;
或者
insert /*+ append */ into test select * from test;
其中insert 多次執行
這裡run是執行的次數,insert count是插入的行數,nocommit是每次插入都不提交,commit是每次插入後提交,/*+append*/也是每次插入後都提交,/*+append*/ nologging是在第一次建立表的時候增加nologging引數
結果如下:
run | insert count | nocommit | commit | /*+append*/ |
1 | 49790 | 00: 00: 00.31 | 00: 00: 00.29 | 00: 00: 00.73 |
2 | 99580 | 00: 00: 00.21 | 00: 00: 00.23 | 00: 00: 00.71 |
3 | 199160 | 00: 00: 01.73 | 00: 00: 02.75 | 00: 00: 04.21 |
4 | 398320 | 00: 00: 03.20 | 00: 00: 03.09 | 00: 00: 06.14 |
5 | 796640 | 00: 00: 32.85 | 00: 00: 32.21 | 00: 00: 12.11 |
6 | 1593280 | 00: 01: 11.93 | 00: 01: 10.89 | 00: 00: 23.18 |
7 | 3186560 | 00: 02: 18.70 | 00: 02: 33.29 | 00: 00: 45.90 |
drop table | 00: 02: 38.31 | 00: 02: 42.01 | 00: 00: 00.56 | |
archive log | 710MB | 710MB | 710MB |
run | insert count | /*+append*/ nologging |
1 | 49790 | 00: 00: 00.64 |
2 | 99580 | 00: 00: 00.92 |
3 | 199160 | 00: 00: 01.68 |
4 | 398320 | 00: 00: 02.82 |
5 | 796640 | 00: 00: 04.57 |
6 | 1593280 | 00: 00: 09.23 |
7 | 3186560 | 00: 00: 17.65 |
drop table | 00: 00: 00.64 | |
archive log | 900KB |
從這個時間的花費上來看 很明顯的可以得出以下結論:
1.插入表的耗時隨著資料量的增大,基本上是跟資料量成比例的,但是在資料量很小的情況下幾乎沒有差異。
2.使用append引數,可以有效的減少資料的插入時間。
3.不使用append引數的表 丟棄的時間甚至比最後一次插入的時間還要久,而使用append引數的表丟棄的時間非常短,當然此時實際的資料量是最後一次提交的兩倍,因為append引數的作用大家都知道是在每次提交前緊接著前面的資料來存放記錄,因此被丟棄的表的資料在一個同一個或者相鄰的資料塊的情況下速度非常快,反之則非常慢,同理也應該不難得出 在對錶進行掃描的情況下資料存放在相鄰塊的表肯定效率也會是非常高的。
4.append在沒有使用nologging的情況下,並不會減少歸檔日誌的產生。
5.將表改為nologging屬性的情況下插入資料,幾乎不會產生歸檔日誌,但前提是必須要使用append引數,否則產生依然會產生歸檔日誌,只不過表在建立時不會產生歸檔,我在使用nologging同時不加append的情況下,產生的歸檔是690M左右,這也就能證明剛才的結論了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12216142/viewspace-613951/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- append和nologging的案例APP
- ORACLE RAC模式下歸檔模式和非歸檔模式的切換方法Oracle模式
- MySQL自增列鎖模式 innodb_autoinc_lock_mode不同引數下效能測試MySql模式
- oracle nologging和appendOracleAPP
- 開啟歸檔模式及其相關引數模式
- Oracle歸檔模式、引數意義、設定Oracle模式
- nologging和insert /*+append*/APP
- Oracle歸檔模式和非歸檔模式Oracle模式
- Oracle歸檔模式和非歸檔模式的區別Oracle模式
- RAC下歸檔不放到共享盤的測試
- 聊聊Append、nologging和Redo LogAPP
- 歸檔相關引數
- Oracle歸檔模式的命令及引數(摘錄自網路)Oracle模式
- Nologging and append testAPP
- CTAS和insert append的一個測試APP
- Apache Prefork和Worker模式的效能比較測試Apache模式
- 效能測試工具Lmbench的使用和下載
- oracle10g 歸檔模式和非歸檔模式的轉換Oracle模式
- nologging與append ztAPP
- MySQL 5.6 innodb_io_capacity引數效能測試MySql
- Oracle 歸檔和非歸檔模式之間的切換Oracle模式
- 閃迴歸檔的簡單測試
- 閃回與歸檔引數的設定
- 歸檔和非歸檔模式下ORA-01145錯誤的解決方法模式
- 歸檔模式與非歸檔模式的切換模式
- 介面測試和效能測試的區別
- 更改oracle10g的歸檔模式和歸檔路徑Oracle模式
- 介面測試並不只是測試引數和返回值
- 軟體效能測試指標引數怎麼擬定指標
- 非歸檔模式改為歸檔模式模式
- 物理DG刪除歸檔測試
- piner的歸檔模式下丟失或損壞一個資料檔案,在linux+oracle10g下測試成功!模式LinuxOracle
- Jmeter效能測試 —— 壓力模式JMeter模式
- RAC 環境下修改歸檔模式模式
- Oracle10g歸檔引數研究Oracle
- Oracle歸檔引數設定問題Oracle
- 非歸檔模式下的資料備份模式
- alter table nologging /*+APPEND PARALLEL(n)*/APPParallel