Concept and mechanism
Diagnosis starts with the operation that regressed, the affected window, and a comparable baseline. DB time aggregates CPU and non-idle waits of foreground sessions and can exceed wall-clock duration under concurrency. It is not the complete browser-to-user request duration.
Compare volume, throughput, times, and wait classes before attributing cause. AWR, ASH, and SQL Monitoring can provide detailed evidence, but use depends on the offering and applicable packs. A visible button or enabled parameter does not grant entitlement.
Teams should know which mechanisms are authorized for their environment, including direct SQL access. Business latency and database workload should be reported as related but distinct measurements.
Guided application
In a fictional report, a query estimates few rows but processes millions. Examine predicates, statistics, and data distribution using runtime observations when available. An unchanged plan hash does not guarantee unchanged duration: binds, volume, resources, and concurrency can change.
Value binds support cursor reuse but do not replace plan evaluation for different distributions. When work spills to TEMP, assess work memory and total consumption before increasing limits. For long queries, RETENTION GUARANTEE can preserve unexpired undo at the cost of DML failures when space runs out.
Each mitigation should record expected benefit, transferred risk, and the measurement that will establish improvement rather than relying on a single green indicator.
Identity and observation duration
A sample needs database, container, instance, session and time. SID can be reused after a session ends; SERIAL# helps distinguish current identity. Before intervening, recollect context and the owner’s work.
In a cluster, include instance when connecting workers to their coordinator. STATUS and LAST_CALL_ET also need joint interpretation: for an INACTIVE session, 600 seconds means time since inactivity began, not a ten-minute query still executing.
Missing SQL_ID in a late capture does not prove no earlier work. PREV_SQL_ID is a lead requiring time correlation, not a declaration that the statement remains active.
Do not turn the last wait into a current wait
EVENT describes the current wait while a session waits but can describe the last wait once it has ended. Collect STATE and time before blaming storage from an I/O event name. For blocking, BLOCKING_SESSION and BLOCKING_INSTANCE have valid meaning when BLOCKING_SESSION_STATUS is VALID.
UNKNOWN does not authorize choosing a residual session value for termination. A two-minute-old capture may no longer represent the chain either. Identify transaction, owner and consequences before deciding.
Diagnostic quality depends as much on recognizing what the snapshot does not prove as on collecting more columns.
Counters, deltas and parallelism
V$SQL has one row per child cursor and counters tied to its cache lifecycle. For compatible samples, subtract numerator and denominator over the same window. If EXECUTIONS rises from 100 to 120 and ELAPSED_TIME from 40 to 50 million microseconds, the quotient is ten seconds per twenty executions, or 0.5 seconds.
Do not divide fifty historical seconds by twenty new executions. If reload occurs and the counter falls from 800 to 5, publish neither a negative rate nor its absolute value. Start a new series and document the gap.
ELAPSED_TIME can sum coordinator and parallel workers; it is not necessarily client-measured wall time.
Instrumentation that follows work
Use MODULE and ACTION to connect sessions with business stages, updating or clearing values as work changes. In a pooled connection, leaving close_funds after closing can attribute reporting queries to the previous action. Define instrumentation contracts with development and validate connection reuse.
Do not use CLIENT_INFO as protected authorization: it is a user-readable and writable label. The application needs an appropriate context mechanism for security attributes. Also distinguish current-session MODULE/ACTION from V$SQL values associated with when SQL was first parsed.
Context should accompany the metric rather than assuming a historical label describes all future work.
Worked exercise: four snapshots
A shows EXECUTIONS 100→120 and ELAPSED_TIME 40→50 million: 0.5 seconds per increment, without proving p95 or network time. B shows SID 73 with a different SERIAL#: do not reuse an earlier session decision. C shows an I/O event with STATE no longer waiting: do not claim current blocking from the event alone.
D shows null SQL_ID and populated PREV_SQL_ID: correlate the previous statement with request and timestamps. For each row, write a supported conclusion and a hypothesis not yet proven. Every value is synthetic.
Proposed queries depend on privileges and authorized context; this exercise captured no actual views and used no AWR, ASH or SQL Monitoring.
SYNTHETIC SNAPSHOTS
A EXECUTIONS 100->120; ELAPSED_TIME 40000000->50000000 us
B SID=73; SERIAL# 910->911
C EVENT=I/O; STATE=WAITED KNOWN TIME
D SQL_ID=NULL; PREV_SQL_ID=previous_id
A: (50000000-40000000)/(120-100)/1000000 = 0.5 s
B: confirm new identity
C: last wait is not current wait
D: correlate previous executionTen wall-clock minutes and thirty DB-time minutes represent three average active sessions over that window.
Common pitfalls
Average CPU as complete diagnosis; cost as time; same plan as same performance; memory without aggregate limits.
Related topics: Containers, services, and resources · PDB lifecycle and isolation · Backup and recovery evidence
Interpret each metric with valid identity, scope, state and time window.
References
- Time model and wait events · Oracle AI Database 26ai documentation inspected 2026-09-30
- Feature licensing by offering · Oracle AI Database 26ai documentation inspected 2026-09-30
- Scalable bind based execution · Oracle AI Database 26ai documentation inspected 2026-09-30
- Execution plans and runtime statistics · Oracle AI Database 26ai documentation inspected 2026-09-30
- Undo retention trade-offs · Oracle AI Database 26ai documentation inspected 2026-09-30
- AutoUpgrade Processing Modes · Oracle AI Database 26ai public documentation
- AutoUpgrade Preupgrade Checks · Oracle AI Database 26ai public documentation
- AutoUpgrade Workflows and Stages · Oracle AI Database 26ai public documentation
- AutoUpgrade Patching · Oracle AI Database 26ai public documentation
- DBA_REGISTRY_SQLPATCH · Oracle AI Database 26ai public documentation
- AutoUpgrade Configuration Options · Oracle AI Database 26ai public documentation
- Required Postupgrade Tasks · Oracle AI Database 26ai public documentation
- Recommended Postupgrade Tasks · Oracle AI Database 26ai public documentation
- Oracle Database Compatibility · Oracle AI Database 26ai public documentation
- Preupgrade Information and Supported Upgrade Workflow · Oracle AI Database 26ai public documentation
- V$SESSION · Oracle AI Database 26ai public documentation
- V$SQL · Oracle AI Database 26ai public documentation
- V$SESSION_LONGOPS · Oracle AI Database 26ai public documentation
- DBMS_APPLICATION_INFO · Oracle AI Database 26ai public documentation
- V$SQL_WORKAREA_ACTIVE · Oracle AI Database 26ai public documentation
- V$PGASTAT · Oracle AI Database 26ai public documentation
- Managing Resources with Oracle AI Database Resource Manager · Oracle AI Database 26ai public documentation
- Cloning a PDB · Oracle AI Database 26ai public documentation
- Recovering Tables and Table Partitions · Oracle AI Database 26ai public documentation
- RMAN Backup Concepts · Oracle AI Database 26ai public documentation
- Monitoring True Cache with the V$TRUE_CACHE View · Oracle AI Database 26ai documentation inspected 2026-10-08