Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.49 KB

File metadata and controls

20 lines (15 loc) · 1.49 KB

Case Study & Technical Analysis

Abstract

The DBA SGA SQL Performance Summary report provides a snapshot of the most resource-intensive SQL statements currently in the database memory. It fills the gap left by AWR reports, which only capture the "Top N" SQLs at hourly intervals. This report is essential for identifying "flash" performance issues—queries that run frequently or poorly for a short period but don't sustain enough load to be persisted to AWR.

Technical Analysis

Core Features

  • Bind Variable Capture: Retrieves values from GV$SQL_BIND_CAPTURE, allowing developers to reproduce the issue in a separate session with actual data.
  • Literal Analysis: Includes a "Literals Duplication Count" to identify applications that are failing to use bind variables (hard parse storms), which can devastate CPU and Shared Pool performance.
  • Granular Filtering: Allows filtering by module, user, or specific time windows (e.g., "Last Active Time").

Key Views

  • GV$SQLAREA: Aggregated statistics for SQL statements (execution count, elapsed time, CPU time).
  • GV$SQL_BIND_CAPTURE: Sampled bind values for the queries.

Operational Use Cases

  • Code Review: Identifying SQLs with high DISK_READS or BUFFER_GETS per execution.
  • Ad-hoc Tuning: Quickly finding the SQL_ID for a query that a user complains is "slow right now."
  • Security Audit: Checking for SQL injection patterns or unexpected queries from specific modules.