SQL Diagnostic Report(23ai, 19.28)
Before Oracle Database 23ai, the awrsqrpt.sql script was commonly used to analyze the evolution of a SQL statement’s execution plan, plan statistics, CPU usage, I/O, and elapsed time over a specified period. However, this approach had two main limitations: It required specifying two specific AWR snapshots. The information provided in its report was relatively limited. Sample Output of awrsqrpt.sql: Press enter or click to view image in full size With the introduction of Oracle Database 23ai, a new function, REPORT_SQL, was added to the DBMS_SQLDIAG package. This function generates a comprehensive HTML diagnostic report for a specified SQL statement, providing deeper performance insights. This functionality is also backported to Oracle Database 19.28. The REPORT_SQL function provides a graphical report in HTML format, allowing for the analysis of: Execution plan history Cursor sharing information Optimizer statistics history Index details And more REPORT_SQL Function: SQL ...