国产探花免费观看_亚洲丰满少妇自慰呻吟_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.
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 彝良县| 天柱县| 天水市| 东莞市| 礼泉县| 宿迁市| 买车| 天门市| 永昌县| 景泰县| 万源市| 清水县| 商城县| 阿拉尔市| 高碑店市| 香港 | 日土县| 加查县| 石首市| 孝感市| 句容市| 汝州市| 贵南县| 兴山县| 湄潭县| 临西县| 长治市| 当阳市| 东宁县| 河池市| 樟树市| 炎陵县| 吉首市| 南漳县| 房山区| 慈溪市| 南召县| 定西市| 襄汾县| 宜兴市| 莱阳市|