硬解析物理讀VS軟解析邏輯讀 測試
前提:瞭解硬解析和軟解析的定義
硬解析物理讀VS軟解析邏輯讀
這部分比較簡單,無須多說,直接看結果
zo_leave@orcl> alter system set events 'immediate trace name flush_cache'; -- 清除緩衝區快取
系統已更改。
已用時間: 00: 00: 16.44
zo_leave@orcl> alter system flush shared_pool; -- 清除共享池
系統已更改。
已用時間: 00: 00: 00.73
zo_leave@orcl> set autotrace traceo
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.10
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
522 recursive calls
0 db block gets
92 consistent gets
18 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
6 sorts (memory)
0 sorts (disk)
3 rows processed
-- 僅清空清除緩衝區快取
zo_leave@orcl> set autotrace off
zo_leave@orcl> alter system set events 'immediate trace name flush_cache';
系統已更改。
已用時間: 00: 00: 10.56
zo_leave@orcl> set autotrace traceo
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.03
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
6 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
-- 不做任何處理
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.00
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
0 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
硬解析物理讀VS軟解析邏輯讀
這部分比較簡單,無須多說,直接看結果
zo_leave@orcl> alter system set events 'immediate trace name flush_cache'; -- 清除緩衝區快取
系統已更改。
已用時間: 00: 00: 16.44
zo_leave@orcl> alter system flush shared_pool; -- 清除共享池
系統已更改。
已用時間: 00: 00: 00.73
zo_leave@orcl> set autotrace traceo
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.10
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
522 recursive calls
0 db block gets
92 consistent gets
18 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
6 sorts (memory)
0 sorts (disk)
3 rows processed
-- 僅清空清除緩衝區快取
zo_leave@orcl> set autotrace off
zo_leave@orcl> alter system set events 'immediate trace name flush_cache';
系統已更改。
已用時間: 00: 00: 10.56
zo_leave@orcl> set autotrace traceo
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.03
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
6 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
-- 不做任何處理
zo_leave@orcl> select * from scott.emp where deptno = '10';
已用時間: 00: 00: 00.00
執行計劃
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 261 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 3 | 261 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("DEPTNO"=10)
Note
-----
- dynamic sampling used for this statement
統計資訊
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
0 physical reads
0 redo size
943 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26477854/viewspace-1072247/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 硬解析和物理讀取與軟解析和邏輯讀取
- Oracle物理讀和邏輯讀Oracle
- oracle 物理讀 邏輯讀的理解Oracle
- oracle 物理讀,邏輯讀的理解Oracle
- 有關oracle邏輯讀和物理讀Oracle
- 軟解析、硬解析的一個小測試
- buffer cache實驗9-從buffer caceh中讀取資料塊解析-從邏輯讀到物理讀
- 資料讀取之邏輯讀簡單解析--關於BUFFER CACHE
- 在Oracle中,什麼是物理讀和邏輯讀?Oracle
- ORACLE 硬解析和軟解析 軟軟解析Oracle
- 軟解析和硬解析
- ORACLE 物理讀 邏輯讀 一致性讀 當前模式讀總結淺析Oracle模式
- 徹底弄懂oracle硬解析、軟解析、軟軟解析Oracle
- Oracle 硬解析與軟解析Oracle
- ORACLE SQL解析之硬解析和軟解析OracleSQL
- Oracle的硬解析和軟解析Oracle
- Oracle中的遊標、硬解析、軟解析、軟軟解析、解析失敗Oracle
- 軟體測試的底層邏輯
- 解析jwt實現邏輯JWT
- Oracle SQL的硬解析和軟解析OracleSQL
- 草稿 - 遊標,硬解析,軟解析 等
- soft parse(軟解析),hard parse(硬解析)
- [20150309]邏輯讀產生CBC Latch的解析.txt
- 解析2011年GCT邏輯試題(1)GC
- oracle邏輯讀過程Oracle
- Oracle邏輯讀詳解Oracle
- 《iOS進階指南》試讀之《Mantle解析》iOS
- 軟體測試面試過程解析面試
- Commit和dbwr沒有任何關係、物理讀產生邏輯讀、快照過舊的理解MIT
- SAP UI5 應用讀取 CSRF token 的 HTTP head 請求邏輯解析UIHTTP
- 什麼是oracle 邏輯讀?Oracle
- SQL大致流程、SPM、軟軟、軟、硬解析SQL
- Oracle的軟解析(soft prase)和硬解析(hard prase)Oracle
- 【專題】深入解析軟體測試外包
- sql生成可讀性邏輯圖SQL
- 深入瞭解ORACLE的邏輯讀Oracle
- Fescar example解析 - TM傳送邏輯
- 程式設計師面試邏輯題解析程式設計師面試