《oracle 11 awr分析》正文开始,本次阅读大概10分钟。
Oracle 11 AWR(Automatic Workload Repository)是Oracle数据库中的一个重要的性能测试工具,它可以帮助管理员在数据库系统中监控和调整系统性能。AWR可以收集系统性能数据并提供统计和分析,从而使管理员更加了解他们的数据库系统。
在AWR中,有许多指标可以用来分析数据库的性能。其中包括CPU使用率、I/O请求等待时间、缓存命中率等。管理员们可以基于这些指标来调整他们的数据库系统,以提高数据库的性能和响应时间。
下面是一些AWR分析的示例:
# awr report Workload Repository Report DB Name DB Id Instance Host ------------ ------------ ---------- ---------- ------------ testdb 1234567890 1 testhost.test.com Snap Id Snap Time Sessions Cursors/Session --------- ------------------- -------- ---------------- Begin Snap: 900 01-Jul-17 139 6.1 End Snap: 910 02-Jul-17 139 5.8 Elapsed: 24.00 (mins) Top 10 Foreground Events by Total Wait Time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class ------------ -------------------- ----------------- ------------ --------------- CPU time 58068.4 24.46 96.2 CPU db file sequential read 865,789 10,003.7 11.54 .0 User I/O db file scattered read 5,284 2,182.2 413.17 .0 User I/O log file sync 5250 186.5 35.50 .0 Commit buffer busy waits 39,707 100.6 2.53 .0 Concurrency events in waitclass Other 112,195 77.1 0.69 .0 Other direct path read temp 22,726 46.2 2.03 .0 User I/O latch free 130 22.2 170.76 .0 Other enq: TX - index contention 2 20.8 10411.68 .0 Application control file parallel write 93 10.3 111.05 .0 System I/O
这是一段AWR报告的示例。在这个报告中,我们可以看到所提供的统计信息,包括Snapshot ID,Snapshot时间,每个等待事件的总等待时间(按百分比排列)以及所属的等待类别。
AWR还可以帮助管理员分析与系统资源有关的问题,如以下示例所示:
SELECT * FROM dba_hist_system_event WHERE event_name='log file sync' AND wait_class='Commit'; SNAP_ID EVENT_NAME WAITS TOTAL_WAITS TIME_WAITED_MICRO ---------- ------------------ ------------ ---------------- ------------------ 1355 log file sync 153439 3483500256 20526964 1356 log file sync 120387 2421122412 13290614 1357 log file sync 127277 2384740986 11592540 1358 log file sync 122502 2161282269 6924446 1359 log file sync 122294 2143566754 6626798 1360 log file sync 122607 2317501732 8891687
在这个例子中,查询了用于等待时间最长的等待事件之一——'log file sync'的数据。我们可以看到等待事件'log file sync'在历史上的表现如何。通过这些数据,管理员们可以基于它们的现有硬件和各种其他因素,来决定如何配置他们的数据库系统。
总体来说,Oracle 11 AWR是一个强大的数据库性能分析工具,通过提供详细的性能分析,帮助管理员更好地了解数据库系统的瓶颈和问题,从而能够更好地优化系统性能。