Bootstrap

oracle 19c dml commit命令耗时过长案例分析

最近现场新装了套oracle 19c的rac库准备用来进行迁移,测试阶段发现commit命令响应极其缓慢,具体如下:

16:46:24 SQL> delete from SPA.SQLSET_SPATAB3 where MODULE=‘PL/SQL Developer’;
4 rows deleted.
Elapsed: 00:00:00.33

16:46:39 SQL> commit;
Commit complete.
Elapsed: 00:00:13.62

通过测试,DML语句在执行阶段都正常,从响应时间上来看,没有产生什么异常等待,反而commit命令的响应非常慢。由于commit命令会触发lgwr进程刷出redo buffer的数据,进一步核实lgwr trc发现没有warning,看上去lgwr进程状态也比较正常.没办法,只能做个awr翻翻看看.

Top 10 Foreground Events by Total Wait Time
Event Waits Total Wait Time (sec) Avg Wait % DB time Wait Class
log file sync 8 20.2 2527.69ms 11.5 Commit

Event Waits %Time -outs Total Wait Time (s) Avg wait Waits /txn % bg time
db file parallel write 693,036 0 761

;