暂无图片
分享
我是路人甲
2019-09-05
direct path read只会在全表扫描和并行查询时出现吗?

数据库是11.2.0.4,AWR报告中看到direct path read是第二位的等待事件,在按耗时,物理读,逻辑读,用户IO统计的吗top sql中前两位的sql语句都是条件匹配的单表查询语句,查询条件的两个字段在表上建有非唯一索引。在segments

收藏
分享
3条回答
默认
最新
Moone

AWR看直接路径都注意关注 SQL ordered by Physical Reads、Segments by Direct Physical Reads


direct path read不一定就是全部扫描的,参考MOS文档:

Direct path reads are generally used by Oracle when reading directly into PGA memory (as opposed to into the buffer cache). If asynchronous IO is supported (and in use) then Oracle can submit IO requests and continue processing. It can then pick up the results of the IO request later and will wait on "direct path read" until the required IO completes.

If asynchronous IO is not being used then the IO requests block until completed but these do not show as waits at the time the IO is issued. The session returns later to pick up the completed IO data but can then show a wait on "direct path read" even though this wait will return immediately.

Hence this wait event is very misleading as:

The total number of waits does not reflect the number of IO requests

The total time spent in "direct path read" does not always reflect the true wait time.

This style of read request is typically used for:

Sort IO (when a sort does not fit in memory)

Parallel Query slaves

Readahead (where a process may issue an IO request for a block it expects to need in the near future)



暂无图片 评论
暂无图片 有用 0
我是路人甲

明白了,谢谢回复,手机编辑的还有一部分信息没有发出来。

暂无图片 评论
暂无图片 有用 0
我是路人甲
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏