Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Graphical Execution Plans in SQL Notebooks #4404

AlejoSQL opened this issue Mar 12, 2019 · 7 comments

Include Graphical Execution Plans in SQL Notebooks #4404

AlejoSQL opened this issue Mar 12, 2019 · 7 comments
Area - Notebooks Enhancement Request for new features or functionality Impact: Live site Issues impacting live site work stream Triage: Done


Copy link

Is your feature request related to a problem? Please describe.
It is a feature request (@chlafreniere @vickyharp )

Describe the solution or feature you'd like
Current support for SQL Notebooks include results from the execution. However, for many operational guidance docs, it is common to add either a screenshot of the execution plan or attach the .sqlplan files.
So it would be great to have an extension to the current cells/maybe a new one , that actually stores the Actual execution plan inside the notebook.

Describe alternatives you've considered
Well, continue sending the bunch of sqlplans, lol

Additional context

@AlejoSQL AlejoSQL added the Enhancement Request for new features or functionality label Mar 12, 2019
@AlejoSQL AlejoSQL changed the title Include Graphical Execution Plans in SQL Workbooks Include Graphical Execution Plans in SQL Notebooks Mar 12, 2019
@chlafreniere chlafreniere added this to the May Release milestone Mar 25, 2019
@kburtram kburtram modified the milestones: May Release, Planning Apr 3, 2019
@kevcunnane kevcunnane removed this from the Planning milestone Jun 6, 2019
@kburtram kburtram added this to the Backlog milestone Jul 1, 2019
@corivera corivera closed this as completed Jan 7, 2020
Copy link

Is it closed as never being done, or is there a related issue, or...

@corivera corivera modified the milestones: Backlog, Planning Jan 7, 2020
@corivera corivera reopened this Jan 7, 2020
Copy link

corivera commented Jan 7, 2020

Reopening this Enhancement for future planning.

@kburtram kburtram modified the milestones: Planning, Backlog Jan 15, 2020
Copy link

amtwo commented Jan 27, 2021

We are in process of moving all our incident response / troubleshooting KBs to Notebooks. As we build out notebooks, most of our performance-related KBs include checking for a query plan. Even in cases where the troubleshooting begins with checking in our performance monitoring software and getting a plan there, troubleshooting these performance related issues eventually comes around to getting an actual execution plan.

For these performance-related use cases, because we cannot gather an actual execution plan in a SQL Notebook, we've not yet been able to migrate those KBs to be notebooks--and because of that, Notebooks may add friction to those troubleshooting scenarios.

Ideally the workflow for performance related issues would be something along the lines of:

  1. Open the Notebook that corresponds to the symptom/complaint/alert. (For example, "server CPU is high")
  2. Notebook contains a link to point user to performance monitoring software to help identify problematic query(ies).
  3. User returns to Notebook with additional info, and logic/branching pushes them to possible next Notebooks (For example, tuning the query, etc)
  4. As part of query tuning, the first step is nearly always to attempt to capture an actual execution plan. Other methods may be to pull a plan from cache--and be able to open the xml query result from the Notebook results grid & view it as a graphic execution plan (similar to SSMS).
    SELECT cp.plan_handle, qp.query_plan
    FROM sys.dm_exec_cached_plans AS cp
    CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) AS qp
    WHERE <my query>

@MsSQLGirl MsSQLGirl added the Impact: Live site Issues impacting live site work stream label Jan 27, 2021
Copy link

If it helps, here's my use case: I do a lot of public & private training classes that focus on performance tuning, and the first step in query tuning is query plans.

Notebook support for query plans is the one thing holding me back from using Azure Data Studio in all of my training classes, all of 'em, full stop. If I had query plans - even just the current html-query-plan implementation is fine - then I would migrate every class I have over to Azure Data Studio notebooks, and use it in all my blog posts where I discuss query plans.

I'm completely sold that ADS notebooks are a much better training experience for both teachers & students because:

  • Students who DO have the demo database can follow along, running the queries, seeing the plans, and seeing my notes, and take their own notes in there
  • Students who DON'T have the demo database can still follow along, seeing the query plans from my machine from when I ran 'em and upload them
  • ADS is cross-platform, empowering those of us on Macs and Linux
  • I can abandon PowerPoint completely, putting all supporting materials directly into the notebook

Copy link

MsSQLGirl commented Apr 12, 2021

Linking comment: #15095 (comment)
Linking related issue: #15095

Copy link

+1 for this. Having the execution plan stored would be useful for regression and testing. Getting a notebook from someone with a previous results of a query and comparing that to the current plan I see in SSMS/ADS is helpful to determine if my efforts are improving or worsening performance.

Copy link

This would such a useful feature to unlock SQL notebook for educational and training purposes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Area - Notebooks Enhancement Request for new features or functionality Impact: Live site Issues impacting live site work stream Triage: Done
None yet

No branches or pull requests

10 participants