關於統計中Consistent Gets,Physical Reads和DB Block Gets的意義
Consistent Gets,Physical Reads和DB Block Gets的意義
這個問題,我似乎找了很多遍,也記了很多遍,似乎現在還是搞的比較迷糊,今天看到ITPUB上的一個帖子
http://www.itpub.net/showthread.php?s=9650d33f292c0cc948b9fb9ce80047f0&threadid=605100
好好總結一下:
在Oracle的文件中有這樣的解釋:
db block gets | Number of times a CURRENT block was requested. |
consistent gets | Number of times a consistent read was requested for a block. |
physical reads | Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache. |
· DB Block Gets. Number of times a CURRENT block was requested.
當前請求的塊數目
Current mode blocks are retrieved as they exist right now, not in a consistent read fashion. Normally, blocks retrieved for a query are retrieved as they existed when the query began. Current mode blocks are retrieved as they exist right now, not from a previous point in time. During a SELECT, you might see current mode retrievals due to reading the data dictionary to find the extent information for a table to do a full scan (because you need the "right now" information, not the consistent read). During a modification, you will access the blocks in current mode in order to write to them. (DB Block Gets:請求的資料塊在buffer能滿足的個數)
當前模式塊意思就是在操作中正好提取的塊數目,而不是在一致性讀的情況下而產生的塊數。正常的情況下,一個查詢提取的塊是在查詢開始的那個時間點上存在的資料塊,當前塊是在這個時刻存在的資料塊,而不是在這個時間點之前或者之後的資料塊數目。
· Consistent Gets. Number of times a consistent read was requested for a block.
This is how many blocks you processed in "consistent read" mode. This will include counts of blocks read from the rollback segment in order to roll back a block. This is the mode you read blocks in with a SELECT, for example. Also, when you do a searched UPDATE/DELETE, you read the blocks in consistent read mode and then get the block in current mode to actually do the modification.
(Consistent Gets:資料請求總數在回滾段Buffer中的資料一致性讀所需要的資料塊)
這裡的概念是在處理你這個操作的時候需要在一致讀狀態上處理多少個塊,這些塊產生的主要原因是因為由於在你查詢的過程中,由於其他會話對資料塊進行操作,而對所要查詢的塊有了修改,但是由於我們的查詢是在這些修改之前呼叫的,所以需要對回滾段中的資料塊的前象進行查詢,以保證資料的一致性。這樣就產生了一致性讀。
· Physical Reads. Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache. (Physical Reads:例項啟動後,從磁碟讀到Buffer Cache資料塊數量)
物理讀:就是從磁碟上讀取資料塊的數量,這裡主要產生的原因是因為:
1、 在資料快取中沒有存在這些塊
2、 全表掃描
3、 磁碟排序
三者之間的關係:
邏輯讀是指的是Oracle從記憶體中讀到的資料塊的數量。一般而言是'consistent gets' + 'db block gets'。當在記憶體中不存在所需要的資料塊的話就需要從磁碟中獲取,這就產生了磁碟讀。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/222350/viewspace-907914/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- db block gets 與 consistent read getsBloC
- C語言關於指標,gets()和gets_s()函式的理解C語言指標函式
- getc();fgetc();getchar();gets();fgets();
- [20190416]檢視shared latch gets的變化.txt
- Oracle一致性讀(consistents gets)Oracle
- [20210208][20200426]檢視shared latch gets的變化.txt
- cell single block physical read等待事件BloC事件
- 緩衝區溢位漏洞那些事:C -gets函式函式
- 關於System.out.println的意義
- 關於特徵值和特徵向量的幾何直覺意義特徵
- C/C++輸入函式 scanf() gets() getline() cin.getline() cin.get() getchar()C++函式
- 關於潛意識落地計劃
- 關於ERP,中臺和低程式碼,我的幾點意見
- 關於 block 會不會被自動 copy 的實驗和猜想BloC
- vue中“:”、“.”、“@”意義Vue
- HBase中Memstore存在的意義以及多列族引起的問題和設計
- 實踐和思考的重要意義
- 關於意義:從現實到遊戲,從自我到自由遊戲
- 2.6.5.1 DB_BLOCK_SIZE 初始化引數BloC
- lscpu中的 socket、core、thread的意義thread
- iOS block巢狀block中weakify的使用iOSBloC巢狀
- 中臺建設中的幕後意義
- mysql關於db.opt檔案的總結MySql
- 實施CRM系統的意義何在?
- [讀書筆記] Ruby 中的 Block 和 Iterator筆記BloC
- CSS 中的 float、BFC、position 和 inline-blockCSSinlineBloC
- 軟體測試的目的和意義
- 好程式設計師ava培訓分享void的用法和意義程式設計師
- Unused Block Compression和Null Block CompressionBloCNull
- python中的一個現象,db.commit和db.commit()PythonMIT
- 幾何圖形在logo設計中的有哪些情感意義?Go
- 能耗管理系統,能源管理系統的意義
- 人生的意義
- OA系統,會議管理的意義何在?
- 我似乎理解了程式設計的意義程式設計
- 讓程式設計迴歸原始的意義!程式設計
- Java培訓分享void的用法和意義Java
- Java技術分享:void的用法和意義Java
- VMX - block by NMI和 NMI unblockinig due to IRET 之間的關係BloC