Oracle SQL Developer Extension for VS Code.
Clarify plans are good. You don’t must run the question or have a plan already accessible to see what or how your question would possibly run.
And these have all the time been simple to get, both by actually working the ‘clarify plan for’ SQL command or utilizing our ‘plan button’ within the worksheet toolbar.
Accessible Plan Shows
You might have three choices for viewing plans:
- visible (diagrams)
- plain textual content
- grid/bushes
Right here’s a visualization, versus making you learn extra.

Cached or DBMS_XPLAN shows
It is a function carried over from SQL Developer Traditional.

In 24.4 we launched this similar function in our VS Code extension.

The primary possibility is what you’ve already seen.
The following 3, V$SQL_PLAN…are the place we compute the SQL_ID and supply to point out 3 of the cached plans for that question. We don’t know if these are within the SGA or not, however should you’ve ran the question not too long ago the primary one ought to be accessible.
While you open certainly one of these, you’ll see this distinction within the show:

What concerning the DBMS_XPLAN factor, what’s that do?
We simply generate a question to name the PL/SQL api to get your SQL assertion’s execution plan, like so –

In the event you don’t just like the ‘ALLSTATS LAST’ format, merely change it. We’re simply attempting to avoid wasting you some typing.
What about seeing the plan, because it’s being executed?
Sure, we now have that function in our Extension now as effectively. The database function known as Actual Time SQL Monitoring, or typically simply known as the ‘SQL Monitor’ function.
In the event you right-click in your connection and choose this, you’ll get the report for all accessible SQL Monitoring studies –

Now toggle over to the Plan web page –

Word we might be including sorting/filtering function to the Monitoring report so you may extra simply discover your studies in our subsequent replace.
And sure, you may export the report so it may be shared –

When does this function, matter?
While you’re about to ask somebody for assist with why your question is ‘working so gradual?’ These plans present what the database is doing to get your knowledge.
Typically the optimizer makes lower than excellent decisions, and normally these dangerous plans are due to the way in which you wrote your question, or the statistics on your tables and indexes are lacking or stale.
These plans assist expose the problematic features of the optimizer’s path to getting your knowledge, and normally will present the place the ‘repair’ might be discovered and applied.
I extremely advocate Maria’s ‘tips on how to learn a plan’ publish. She’s added a ton of nice video tutorials to go together with it for max studying!