Oracle query analysis


Oracle Query Analysis shows live and historical SQL workload evidence for a monitored Oracle server. Use it when you need to find expensive SQL, confirm that a query regression occurred, compare recent samples, or open a SQL detail modal with plan and schema-change context.

What Mini DBA collects

Mini DBA samples Oracle query metrics from dynamic performance views such as GV$SQLSTATS or GV$SQL where available. The sampler stores bounded top-query history in the per-server daily history shard and keeps the SQL text separately so repeated samples do not duplicate large text.

The default collection avoids Oracle Diagnostics Pack and Tuning Pack views. It is designed for regular monitoring from base dynamic performance and dictionary views. If your organization enables optional Oracle pack workflows outside Mini DBA, confirm license rights separately.

Live tab

Use Live when investigating current workload. The grid helps you sort by elapsed time, CPU time, executions, buffer gets, disk reads, rows processed, and related metrics. Open a row to inspect SQL text, plan evidence, and AI Assistant context.

If Live is empty, check that the Oracle monitoring login can read the required dynamic performance views and that the workload has not aged out of the shared pool. The permissions modal shows whether Query Intelligence and plan capabilities are available.

History tab

Use History to review query samples over time. Filter by time range, database/container where available, regression-only rows, or query text. Historical rows are stored in the engine's daily SQLite history shard for that Oracle server, so the console can reload evidence after page refreshes or when you click away and back.

Regression rows identify statements whose recent elapsed time, CPU, reads, executions, or plan evidence changed enough to deserve review. Treat a regression as a triage signal rather than an automatic fix: compare the SQL text, plan history, waits, row volume, and business timing before recommending an index, statistics refresh, or SQL rewrite.

Debug workload buttons

Debug builds expose amber workload buttons for deterministic testing. These buttons can create query load, regression-style query changes, plan changes, schema changes, and lock-chain scenarios. They are intended for development, demo, and smoke testing only.

When a debug workload completes, Mini DBA writes samples to history where the related Oracle capability is available. The status text usually includes a search term so you can switch to History and verify the matching rows.

Troubleshooting empty query history

If a workload says samples were written but History is empty, check:

  • The selected engine instance and Oracle server match the server where the workload ran.
  • The time range includes the sample time.
  • Search text is not excluding the rows.
  • The monitoring login can read GV$SQLSTATS or fallback query views.
  • The engine and console were rebuilt together after WCF contract changes.

Related pages