oracle x$bh及v$bh與table cache表快取系列(二)
續:http://space.itpub.net/9240380/viewspace-753456
oracle x$bh及v$bh與table cache表快取系列(一)
---1000條也不快取
19:58:39 SQL> select count(*) from t_sml
2 ;
COUNT(*)
----------
1000
Executed in 0.109 seconds
19:58:39 SQL> select count(*) from t_sml
2 ;
COUNT(*)
----------
1000
Executed in 0.109 seconds
SQL> show user
User is "SYS"
SQL> select * from x$bh where bj=67414;
ADDR INDX INST_ID HLADDR BLSIZ NXT_HASH PRV_HASH NXT_REPL PRV_REPL FLAG FLAG2 LOBID RFLAG SFLAG LRU_FLAG TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD CHANGES CSTATE LE_ADDR DIRTY_QUEUE SET_DS OBJ BA CR_SCN_BAS CR_SCN_WRP CR_XID_USN CR_XID_SLT CR_XID_SQN CR_UBA_FIL CR_UBA_BLK CR_UBA_SEQ CR_UBA_REC CR_SFL CR_CLS_BAS CR_CLS_WRP LRBA_SEQ LRBA_BNO HSCN_BAS HSCN_WRP HSUB_SCN US_NXT US_PRV WA_NXT WA_PRV OQ_NXT OQ_PRV AQ_NXT AQ_PRV OBJ_FLAG TCH TIM CR_RFCNT SHR_RFCNT
---------------- ---------- ---------- ---------------- ---------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ----------- ---------------- ---------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ----------
SQL> /
User is "SYS"
SQL> select * from x$bh where bj=67414;
ADDR INDX INST_ID HLADDR BLSIZ NXT_HASH PRV_HASH NXT_REPL PRV_REPL FLAG FLAG2 LOBID RFLAG SFLAG LRU_FLAG TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD CHANGES CSTATE LE_ADDR DIRTY_QUEUE SET_DS OBJ BA CR_SCN_BAS CR_SCN_WRP CR_XID_USN CR_XID_SLT CR_XID_SQN CR_UBA_FIL CR_UBA_BLK CR_UBA_SEQ CR_UBA_REC CR_SFL CR_CLS_BAS CR_CLS_WRP LRBA_SEQ LRBA_BNO HSCN_BAS HSCN_WRP HSUB_SCN US_NXT US_PRV WA_NXT WA_PRV OQ_NXT OQ_PRV AQ_NXT AQ_PRV OBJ_FLAG TCH TIM CR_RFCNT SHR_RFCNT
---------------- ---------- ---------- ---------------- ---------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ----------- ---------------- ---------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ----------
SQL> /
---500條記錄同樣不快取
20:03:15 SQL> select count(*) from t_sml;
COUNT(*)
----------
500
Executed in 0.046 seconds
20:03:15 SQL> select count(*) from t_sml;
COUNT(*)
----------
500
Executed in 0.046 seconds
--同上不快取
20:04:03 SQL> select count(*) from t_sml;
COUNT(*)
----------
300
Executed in 0.032 seconds
20:04:03 SQL> select count(*) from t_sml;
COUNT(*)
----------
300
Executed in 0.032 seconds
---依舊不快取
20:04:31 SQL> select count(*) from t_sml;
COUNT(*)
----------
100
Executed in 0.031 seconds
20:04:31 SQL> select count(*) from t_sml;
COUNT(*)
----------
100
Executed in 0.031 seconds
---表50條記錄仍不快取
20:05:09 SQL> select count(*) from t_sml;
COUNT(*)
----------
51
Executed in 0.047 seconds
----9條記錄仍不快取,6條也不快取
20:07:17 SQL> select count(*) from t_sml;
COUNT(*)
----------
9
---表中僅一條記錄仍不快取,oracle快取一個表的標準到底是什麼,表的資料量,表的訪問次數;sga data buffer的大小
20:09:31 SQL> select * from t_sml;
A
---------------------------------------
1
Executed in 0.031 seconds
---重啟庫
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Database mounted.
Database opened.
SQL>
---發現仍不快取表
20:13:14 SQL> select * from t_sml;
A
---------------------------------------
1
Executed in 0.047 seconds
20:13:14 SQL> select * from t_sml;
A
---------------------------------------
1
Executed in 0.047 seconds
SQL> select * from x$bh where bj=67414;
ADDR INDX INST_ID HLADDR BLSIZ NXT_HASH PRV_HASH NXT_REPL PRV_REPL FLAG FLAG2 LOBID RFLAG SFLAG LRU_FLAG TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD CHANGES CSTATE LE_ADDR DIRTY_QUEUE SET_DS OBJ BA CR_SCN_BAS CR_SCN_WRP CR_XID_USN CR_XID_SLT CR_XID_SQN CR_UBA_FIL CR_UBA_BLK CR_UBA_SEQ CR_UBA_REC CR_SFL CR_CLS_BAS CR_CLS_WRP LRBA_SEQ LRBA_BNO HSCN_BAS HSCN_WRP HSUB_SCN US_NXT US_PRV WA_NXT WA_PRV OQ_NXT OQ_PRV AQ_NXT AQ_PRV OBJ_FLAG TCH TIM CR_RFCNT SHR_RFCNT
---------------- ---------- ---------- ---------------- ---------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ----------- ---------------- ---------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ----------
SQL> /
ADDR INDX INST_ID HLADDR BLSIZ NXT_HASH PRV_HASH NXT_REPL PRV_REPL FLAG FLAG2 LOBID RFLAG SFLAG LRU_FLAG TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD CHANGES CSTATE LE_ADDR DIRTY_QUEUE SET_DS OBJ BA CR_SCN_BAS CR_SCN_WRP CR_XID_USN CR_XID_SLT CR_XID_SQN CR_UBA_FIL CR_UBA_BLK CR_UBA_SEQ CR_UBA_REC CR_SFL CR_CLS_BAS CR_CLS_WRP LRBA_SEQ LRBA_BNO HSCN_BAS HSCN_WRP HSUB_SCN US_NXT US_PRV WA_NXT WA_PRV OQ_NXT OQ_PRV AQ_NXT AQ_PRV OBJ_FLAG TCH TIM CR_RFCNT SHR_RFCNT
---------------- ---------- ---------- ---------------- ---------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ----------- ---------------- ---------- ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ----------
---建立一個表僅插入一條記錄
20:15:43 SQL> insert into t_other select 1 from dual;
1 row inserted
Executed in 0.11 seconds
20:16:20 SQL> commit;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-753457/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle x$bh及v$bh與table cache表快取系列(三)Oracle快取
- oracle x$bh及v$bh與table cache表快取系列(一)Oracle快取
- Oracle中flush buffer cache和x$bhOracle
- x$le及x$bh詳解
- Oracle內部檢視:X$BH與X$LEOracle
- oracle dml與block xcurrent_cr及x$bh小記OracleBloC
- X$BH與Buffer HeaderHeader
- Oracle內部檢視:X$BHOracle
- X$BH筆記<一>筆記
- oracle cache快取Oracle快取
- buffer cache實驗2-詳解Buffer Header--DUMP buffer結合X$BH檢視各欄位Header
- SpringBoot系列——cache快取Spring Boot快取
- 例項演示oracle資料塊狀態檢視v$bh的用法一 獲取oracle物件所佔用的資料塊Oracle物件
- 資料庫升級造成的X_$BH狀態異常問題資料庫
- 詳解Buffer Header--DUMP buffer結合X$BH檢視各欄位Header
- 【構建Android快取模組】(二)Memory Cache & File CacheAndroid快取
- oracle cache table(轉)Oracle
- oracle cache table(1)Oracle
- oracle cache table(3)Oracle
- oracle cache table(2)Oracle
- oracle cache table(5)Oracle
- oracle cache table(4)Oracle
- oracle cache table(6)Oracle
- 在Buffer Cache中自動大表快取快取
- JAVA 拾遺 — CPU Cache 與快取行Java快取
- 微軟BI 之SSIS 系列 - Lookup 元件的使用與它的幾種快取模式 - Full Cache, Partial Cache, NO Cache...微軟元件快取模式
- mybatis二級快取應用及與ehcache整合MyBatis快取
- oracle result cache 結果集快取的使用Oracle快取
- oracle 10046與select table查詢表系列(一)Oracle
- Spring Boot 揭祕與實戰(二) 資料快取篇 - Redis CacheSpring Boot快取Redis
- Spring Boot 揭祕與實戰(二) 資料快取篇 - Guava CacheSpring Boot快取Guava
- HTTP快取——304與200 from cacheHTTP快取
- Oracle中資料字典快取V$ROWCACHEOracle快取
- oracle底層字典表obj$及source$與儲存過程procedure系列二OracleOBJ儲存過程
- Guava學習:Cache快取Guava快取
- Spring Cache快取框架Spring快取框架
- Android快取機制-LRU cache原理與用法Android快取
- 【轉】設定db_keep_cache_size快取,並把一個表快取進去快取