国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

關于執行計劃里recursive calls,db block gets和consistent ge

2024-07-21 02:07:20
字體:
來源:轉載
供稿:網友

我們在實際工作中經常要看某個sql語句的執行計劃,例如:

在sqlplus使用命令set autotrace on后,執行計劃顯示如下:

select statement optimizer=all_rows (cost=985 card=1 bytes=26)

statistics
----------------------------------------------------------
35 recursive calls
0 db block gets
1052 consistent gets
7168 physical reads
0 redo size
395 bytes sent via sql*net to client
512 bytes received via sql*net from client
2 sql*net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed

其中recursive calls,db block gets,consistent gets的具體含義是什么?

具體解釋如下:

· recursive calls. number of recursive calls generated at both the user and system level.
oracle database maintains tables used for internal processing. when it needs to change these tables, oracle database generates an internal sql statement, which in turn generates a recursive call.
in short, recursive calls are basically sql performed on behalf of your sql. so, if you had to parse the query, for example, you might have had to run some other queries to get data dictionary information. these would be recursive calls. space management, security checks, calling pl/sql from sql—all incur recursive sql calls.

· 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數據塊數量)

· sorts (disk). number of sort operations that required at least one disk write. sorts that require i/o to disk are quite resource intensive. try increasing the size of the initialization parameter sort_area_size.
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 婺源县| 长垣县| 青浦区| 上栗县| 中阳县| 中西区| 甘德县| 南溪县| 大英县| 门源| 固阳县| 碌曲县| 拉萨市| 昌江| 义马市| 任丘市| 铁岭县| 克东县| 五家渠市| 河东区| 洛隆县| 读书| 德江县| 游戏| 道真| 海晏县| 略阳县| 普安县| 开远市| 广灵县| 马公市| 阿拉尔市| 临夏市| 定边县| 渑池县| 黔江区| 仁寿县| 雷州市| 台中市| 太保市| 洛川县|