Oracle 等待事件 direct path write 官方解释,作用,如何使用及优化方法

本站中文解释

Oracle 事件 direct path write 指的是当数据库引擎需要在数据库表中缓存数据,而不是先将数据缓存在buffer cache的情况下,将数据直接插入表中的处理过程。

正是因为直接写插入,所以其处理速度会比数据库标准插入方法要快得多,写操作消耗的时间主要是用于存储过程,而非校验数据;它还可以带来一定的数据库利用率改善,并且能在很大程度上减少对缓存的压力。例如,当使用多次 direct path write 来载入大量数据时,可以显著提升数据库利用率。

direct path write 通常会在批量数据处理或大规模并发操作期间出现,如全表的加载操作或大量的批量更新操作。如果直接写操作发生错误,则会对数据库性能产生极大影响。此外,一般情况下,direct path write 无法直接被记录到 redo log 中。

由于直接写插入用于快速将数据载入表中,相应的,还有一种反向的操作即direct path read,它可以在很大程度上加快表中提取数据的过程。它主要用于批量处理大规模数据库查询,避免查询时间过长。

总之,direct path write 就是一种将数据直接存储到表中的插入操作,它可以大大提升数据库的处理速度,但同时也存在一定的风险,所以在使用的时候应该小心和慎重。

官方英文解释

During Direct Path operations, the data is asynchronously written to the database files. At some stage the session needs to make sure that all outstanding asynchronous I/O have been completed to disk. This can also happen if, during a direct write, no more slots are available to store outstanding load requests (a load request could consist of multiple I/Os).

Wait Time: 10 seconds. The session will be posted by the completing asynchronous I/O. It will never wait the entire 10 seconds. The session waits in a tight loop until all outstanding I/Os have completed.

Parameter Description

descriptor address

This is a pointer to the I/O context of outstanding direct I/Os on which the session is currently waiting

first dba

The dba of the oldest I/O in the context referenced by the descriptor address

block cnt

Number of valid buffers in the context referenced by the descriptor address

See Also:

Oracle Database
Performance Tuning Guide
for more information about this parameter


数据运维技术 » Oracle 等待事件 direct path write 官方解释,作用,如何使用及优化方法