解决direct path read 与 direct path write问题

简介: 1.这个问题主要与sort有关。2.确定对象的sql:SELECT segment_name, partition_name, p1, p2, wait1.

1.这个问题主要与sort有关。

2.确定对象的sql:

SELECT segment_name, partition_name, p1, p2, wait1.sql_hash_value
FROM dba_extents, wait1
WHERE wait1.p2 BETWEEN block_id AND (block_id + blocks - 1)
AND file_id = wait1.p1
AND wait1.event = 'direct path read'
ORDER BY segment_name

3.根据回话读取的数据库文件类型了解回话所做的事情。如果是临时文件,则回话正在读取先前通过direct path write操作的临时段。如果是数据文件,可能是并行查询从属操作在工作。

SELECT NAME
FROM v$datafile
WHERE file# = :p1
UNION ALL
SELECT a.NAME
FROM v$tempfile a, v$parameter b
WHERE b.NAME = 'db_files' AND a.file# + b.VALUE = :p1

4.如果回话读取临时段,要查明是什么类型的段:

SELECT DISTINCT DECODE (ktssosegt,
1, 'SORT',
2, 'HASH',
3, 'DATA',
4, 'INDEX',
5, 'LOB_DATA',
6, 'LOB_INDEX',
'UNDEFINED'
)
FROM SYS.x$ktsso
WHERE inst_id = USERENV ('instance')
AND ktssoses = :cursor_session_address
AND ktssosno = :cursor_serial# ;

5.获取sql语句:

SELECT hash_value, address, piece, sql_text
FROM v$sqltext
WHERE hash_value = :1
ORDER BY hash_value, piece;


目录
相关文章
UE Operation File [ Read / Write ] DTOperateFile Plug-in Description
UE Operation File [ Read / Write ] DTOperateFile Plug-in Description
78 0
|
存储 缓存
【什么是Read Write Through机制】
【什么是Read Write Through机制】
157 0
UE Operation File [ Read / Write ] DTOperateFile 插件说明
UE Operation File [ Read / Write ] DTOperateFile 插件说明
85 0
|
关系型数据库
### avoid read-on-write
### avoid read-on-write 什么是 "read-on-write" problem? 在我们使用最常见的buffer write 中 "read-on-write" 问题指的是当我需要进行小于4k 大小buffer write 的时候, 需要先将数据所在的page 从disk 中读取出放入到page cache, 在page cache 中修改好, 然后再将
1490 0
|
Web App开发 Java 关系型数据库
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unex
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} span.s1 {font: 12.
4648 0