FreeNo sign-up.

Oracle Explain Plan Analyzer

Paste an Oracle execution plan from DBMS_XPLAN. dbCove AI finds the line that costs the time, says why and gives the fix as runnable SQL.

How to get the plan in Oracle

With runtime statistics

Run the statement once with the GATHER_PLAN_STATISTICS hint, then read its last execution:

SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST'));
A statement in the cursor cache

By its SQL_ID, with the bind values the optimizer peeked:

SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('&sql_id', NULL, 'ALLSTATS LAST +PEEKED_BINDS'));
A plan that ran earlier

From AWR, on a database with the Diagnostics Pack:

SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_AWR('&sql_id'));
Estimates only

EXPLAIN PLAN still gets an answer, ranked by the optimizer's cost:

EXPLAIN PLAN FOR SELECT ...; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);

What it looks for in an Oracle plan

Starts times rows

An inner line that starts once per outer row. A full scan under NESTED LOOPS with Starts in the hundreds is the classic slow plan.

E-Rows against A-Rows

The first line where the estimate and the actual count part ways. That is where the optimizer went wrong, and usually the line to fix.

Access or filter

A predicate applied as a filter after a full read, where it could be an access path into an index.

Partition pruning

Pstart and Pstop that cover every partition when the query names one.

The Note section

Dynamic sampling, SQL plan baselines, SQL profiles and statistics feedback that shaped the plan.

This was one statement. dbCove watches all of them.

On your own databases dbCove AI has the history of every plan, every wait and every change, so it can tell you why a plan flipped, not only that it is slow. Free for 2 databases of each engine.

Questions

Is what I paste kept?

It is sent to our AI provider to be explained and kept by us for up to 12 months to improve the tools; the AI provider does not keep it or train on it. Remove passwords and personal data before you paste.

Which output should I paste?

DBMS_XPLAN.DISPLAY_CURSOR with ALLSTATS LAST, from a run with the GATHER_PLAN_STATISTICS hint or STATISTICS_LEVEL set to ALL. It has Starts, A-Rows and A-Time for every line, so the answer is measured, not estimated.

Does it need the Diagnostics or Tuning Pack?

No. DISPLAY_CURSOR and EXPLAIN PLAN need no pack. Only plans read from AWR come from the Diagnostics Pack.

Which versions does it read?

Plans from Oracle Database 11g to 23ai, on any edition, single instance or RAC.