oracle wait event之db file sequential read
---會話1建立測試表並插入資料
SQL> create table t_network(a int);
Table created.
--構建索引,產生db file sequential read
SQL> create index idx_t_single on t_single(a);
Index created.
SQL> insert into t_network values(1);
1 row created.
SQL> commit;
Commit complete.
--會話 清空共享池,便於觀察 db file sequential read
SQL> alter system flush shared_pool;
System altered
SQL> select event,total_waits,time_waited,average_wait from v$session_event where sid=1 order by total_waits desc;
EVENT TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
---------------------------------------------------------------- ----------- ----------- ------------
db file sequential read 139 99 0.71 --此等待事件增大,是因為會讀取與本話相關的一些字典表的資料
SQL*Net message to client 24 0 0
SQL*Net message from client 23 260608 11330.78
log file sync 5 0 0.09
Disk file operations I/O 4 0 0.06
events in waitclass Other 3 6 1.93
SQL*Net break/reset to client 2 0 0.01
enq: RO - fast object reuse 1 1 0.81
8 rows selected
---讀取表記錄
SQL> select * from t_single;
A
----------
1
2
---對比發現db file sequential read等待事件加大了
SQL> /
EVENT TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
---------------------------------------------------------------- ----------- ----------- ------------
db file sequential read 142 104 0.73
SQL*Net message to client 26 0 0
SQL*Net message from client 25 263763 10550.52
log file sync 5 0 0.09
Disk file operations I/O 4 0 0.06
events in waitclass Other 3 6 1.93
SQL*Net break/reset to client 2 0 0.01
enq: RO - fast object reuse 1 1 0.81
8 rows selected
---表已在buffer cache中
SQL> /
A
----------
1
2
---對比發現如表已在buffer cache則db file sequential read不會增加
SQL> /
EVENT TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
---------------------------------------------------------------- ----------- ----------- ------------
db file sequential read 142 104 0.73
SQL*Net message to client 28 0 0
SQL*Net message from client 27 280384 10384.58
log file sync 5 0 0.09
Disk file operations I/O 4 0 0.06
events in waitclass Other 3 6 1.93
SQL*Net break/reset to client 2 0 0.01
enq: RO - fast object reuse 1 1 0.81
8 rows selected
小結:
1,db file sequential read即伺服器程式發出讀取表記錄所屬的資料塊時,如不在buffer cache,則呼叫io自物理磁碟把對應的資料塊讀取到buffer cache,伺服器程式等待這個io動作完成的過程
2,所讀取的資料塊不在buffer cache而在物理磁碟上
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-761570/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【TUNE_ORACLE】等待事件之IO等待“db file sequential read”Oracle事件
- db file sequential read等待事件事件
- 【等待事件】db file sequential read事件
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- Oracle:db file scattered readOracle
- 【TUNE_ORACLE】等待事件之IO等待“db file scattered read”Oracle事件
- [20181130]control file sequential read.txt
- [20181129]大量的control file sequential read.txt
- db file scattered read等待事件事件
- 【等待事件】db file scattered read事件
- [20200120]oracle wait event "enq: SQ – contention" and DBA_DB_LINK_SOURCES.txtOracleAIENQ
- I/O上的等待事件 —— control file sequential read/control file parallel write事件Parallel
- 0316理解db file parallel read等待事件Parallel事件
- 0322理解db file parallel read等待事件2Parallel事件
- [20210315]理解db file parallel read等待事件3.txtParallel事件
- [20210315]理解db file parallel read等待事件4.txtParallel事件
- 【TUNE_ORACLE】等待事件之IO等待“db file parallel write”Oracle事件Parallel
- MXNet: wait_to_read 方法AI
- Oracle RAC 重置db_recovery_file_dest_size引數Oracle
- read content in a text file in pythonPython
- oracle等待事件之cursor:pin S wait on XOracle事件AI
- db block gets 與 consistent read getsBloC
- Oracle RAC Wait EventsOracleAI
- C# read excel file via ExcelDataReaderC#ExcelLDA
- [20191119]測試dbms_system.wait_for_event.txtAI
- 【WAIT】 log file sync等待事件說明AI事件
- The Db2 Recovery History FileDB2
- ORACLE EVENT && ORADEBUGOracle
- Oracle Enqueues Wait Events 二OracleENQAI
- Oracle Enqueues Wait Events 一OracleENQAI
- Oracle Enqueues Wait Events 三OracleENQAI
- 【TUNE_ORACLE】等待事件之IO等待“read by other session”Oracle事件Session
- 【TUNE_ORACLE】等待事件之IO等待“direct path read”Oracle事件
- NoSuchObjectException(message:ods_db.event table not found)ObjectException
- oracle event 2 (zt)Oracle
- iis 0x80070032 Cannot read configuration file because it exceeds the maximum file size
- Oracle RAC+ADG新增資料檔案失敗處理(db_create_file_dest)Oracle
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- 每日一個 Golang Packages 06/07 os File Read wtiteGolangPackage