Does SQL Server Management Studio 2017 Contain a New Explain Feature











up vote
3
down vote

favorite












TL;DR



I happened upon a feature in SQL Server Management Studio v17.9 which I was not aware of. It looks a bit like the EXPLAIN found in Oracle, PostgreSQL and MySQL. Where is this feature documented?



How to Turn The Feature On



I was running the following query with the options Include Actual Execution Plan (Ctrl + M) and Include Live Query Statistics turned on:




SELECT sdes.session_id
,sdes.[status]
,sdes.login_name
,sdes.[host_name]
,sder.blocking_session_id
,sdb.name
,sdes.cpu_time
,sdes.logical_reads --optionally: + sdes.reads + sdes.writes
,sdes.last_request_start_time
,sdes.program_name
,sdes.session_id
,sder.request_id
,dest.[text]
FROM sys.dm_exec_sessions AS sdes
LEFT JOIN sys.dm_exec_connections AS sdec
ON sdes.session_id = sdec.session_id
JOIN sys.databases AS sdb
ON sdes.database_id = sdb.database_id
LEFT JOIN sys.dm_exec_requests AS sder
ON sdes.session_id = sder.session_id
CROSS APPLY sys.dm_exec_sql_text(sdec.most_recent_sql_handle) AS dest
WHERE 1=1
AND sdb.name = ''


Outcome



This produced four results tabs:




  • Results

  • Messages

  • Live Query Statistics

  • Execution Plan


Special Results Tab



When I switched to the Results tab, I noticed a result set just below the actual results which looks like this:



SQL Server Management Studio - Explain Plan





Observations



If I turn on either the Include Actual Execution Plan (Ctrl + M) option or the Include Live Query Statistics option, then the SQL Server Explain isn't displayed. The "SQL Server Explain" is only displayed if both options are turned on.





Questions




  1. Can this feature be turned on without having to activate both Include Actual Execution Plan (Ctrl + M) option and the Include Live Query Statistics?

  2. Where is this neat little feature documented?




Prerequisites



The following components and/or software packages are involved in the scenario:



Server




  • Windows Server 2016

  • SQL Server 2016 SP1


Client




  • Windows 10 Version 1807 (Build 17134)

  • SQL Server Management Studio v17.9


    • Microsoft SQL Server Management Studio 14.0.17285.0

    • Microsoft Analysis Services Client Tools 14.0.1016.283

    • Microsoft Data Access Components (MDAC) 10.0.17134.1

    • Microsoft MSXML 3.0 6.0

    • Microsoft Internet Explorer 9.11.17134.0

    • Microsoft .NET Framework 4.0.30319.42000

    • Operating System 6.3.17134




SQL Server Management Studio v17.9





  • Include Actual Execution Plan (Ctrl + M) turned ON


  • Include Live Query Statistics turned ON










share|improve this question






















  • i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
    – Randi Vertongen
    Nov 28 at 12:50












  • It's also in 2016
    – RIanGillis
    Nov 29 at 15:44















up vote
3
down vote

favorite












TL;DR



I happened upon a feature in SQL Server Management Studio v17.9 which I was not aware of. It looks a bit like the EXPLAIN found in Oracle, PostgreSQL and MySQL. Where is this feature documented?



How to Turn The Feature On



I was running the following query with the options Include Actual Execution Plan (Ctrl + M) and Include Live Query Statistics turned on:




SELECT sdes.session_id
,sdes.[status]
,sdes.login_name
,sdes.[host_name]
,sder.blocking_session_id
,sdb.name
,sdes.cpu_time
,sdes.logical_reads --optionally: + sdes.reads + sdes.writes
,sdes.last_request_start_time
,sdes.program_name
,sdes.session_id
,sder.request_id
,dest.[text]
FROM sys.dm_exec_sessions AS sdes
LEFT JOIN sys.dm_exec_connections AS sdec
ON sdes.session_id = sdec.session_id
JOIN sys.databases AS sdb
ON sdes.database_id = sdb.database_id
LEFT JOIN sys.dm_exec_requests AS sder
ON sdes.session_id = sder.session_id
CROSS APPLY sys.dm_exec_sql_text(sdec.most_recent_sql_handle) AS dest
WHERE 1=1
AND sdb.name = ''


Outcome



This produced four results tabs:




  • Results

  • Messages

  • Live Query Statistics

  • Execution Plan


Special Results Tab



When I switched to the Results tab, I noticed a result set just below the actual results which looks like this:



SQL Server Management Studio - Explain Plan





Observations



If I turn on either the Include Actual Execution Plan (Ctrl + M) option or the Include Live Query Statistics option, then the SQL Server Explain isn't displayed. The "SQL Server Explain" is only displayed if both options are turned on.





Questions




  1. Can this feature be turned on without having to activate both Include Actual Execution Plan (Ctrl + M) option and the Include Live Query Statistics?

  2. Where is this neat little feature documented?




Prerequisites



The following components and/or software packages are involved in the scenario:



Server




  • Windows Server 2016

  • SQL Server 2016 SP1


Client




  • Windows 10 Version 1807 (Build 17134)

  • SQL Server Management Studio v17.9


    • Microsoft SQL Server Management Studio 14.0.17285.0

    • Microsoft Analysis Services Client Tools 14.0.1016.283

    • Microsoft Data Access Components (MDAC) 10.0.17134.1

    • Microsoft MSXML 3.0 6.0

    • Microsoft Internet Explorer 9.11.17134.0

    • Microsoft .NET Framework 4.0.30319.42000

    • Operating System 6.3.17134




SQL Server Management Studio v17.9





  • Include Actual Execution Plan (Ctrl + M) turned ON


  • Include Live Query Statistics turned ON










share|improve this question






















  • i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
    – Randi Vertongen
    Nov 28 at 12:50












  • It's also in 2016
    – RIanGillis
    Nov 29 at 15:44













up vote
3
down vote

favorite









up vote
3
down vote

favorite











TL;DR



I happened upon a feature in SQL Server Management Studio v17.9 which I was not aware of. It looks a bit like the EXPLAIN found in Oracle, PostgreSQL and MySQL. Where is this feature documented?



How to Turn The Feature On



I was running the following query with the options Include Actual Execution Plan (Ctrl + M) and Include Live Query Statistics turned on:




SELECT sdes.session_id
,sdes.[status]
,sdes.login_name
,sdes.[host_name]
,sder.blocking_session_id
,sdb.name
,sdes.cpu_time
,sdes.logical_reads --optionally: + sdes.reads + sdes.writes
,sdes.last_request_start_time
,sdes.program_name
,sdes.session_id
,sder.request_id
,dest.[text]
FROM sys.dm_exec_sessions AS sdes
LEFT JOIN sys.dm_exec_connections AS sdec
ON sdes.session_id = sdec.session_id
JOIN sys.databases AS sdb
ON sdes.database_id = sdb.database_id
LEFT JOIN sys.dm_exec_requests AS sder
ON sdes.session_id = sder.session_id
CROSS APPLY sys.dm_exec_sql_text(sdec.most_recent_sql_handle) AS dest
WHERE 1=1
AND sdb.name = ''


Outcome



This produced four results tabs:




  • Results

  • Messages

  • Live Query Statistics

  • Execution Plan


Special Results Tab



When I switched to the Results tab, I noticed a result set just below the actual results which looks like this:



SQL Server Management Studio - Explain Plan





Observations



If I turn on either the Include Actual Execution Plan (Ctrl + M) option or the Include Live Query Statistics option, then the SQL Server Explain isn't displayed. The "SQL Server Explain" is only displayed if both options are turned on.





Questions




  1. Can this feature be turned on without having to activate both Include Actual Execution Plan (Ctrl + M) option and the Include Live Query Statistics?

  2. Where is this neat little feature documented?




Prerequisites



The following components and/or software packages are involved in the scenario:



Server




  • Windows Server 2016

  • SQL Server 2016 SP1


Client




  • Windows 10 Version 1807 (Build 17134)

  • SQL Server Management Studio v17.9


    • Microsoft SQL Server Management Studio 14.0.17285.0

    • Microsoft Analysis Services Client Tools 14.0.1016.283

    • Microsoft Data Access Components (MDAC) 10.0.17134.1

    • Microsoft MSXML 3.0 6.0

    • Microsoft Internet Explorer 9.11.17134.0

    • Microsoft .NET Framework 4.0.30319.42000

    • Operating System 6.3.17134




SQL Server Management Studio v17.9





  • Include Actual Execution Plan (Ctrl + M) turned ON


  • Include Live Query Statistics turned ON










share|improve this question













TL;DR



I happened upon a feature in SQL Server Management Studio v17.9 which I was not aware of. It looks a bit like the EXPLAIN found in Oracle, PostgreSQL and MySQL. Where is this feature documented?



How to Turn The Feature On



I was running the following query with the options Include Actual Execution Plan (Ctrl + M) and Include Live Query Statistics turned on:




SELECT sdes.session_id
,sdes.[status]
,sdes.login_name
,sdes.[host_name]
,sder.blocking_session_id
,sdb.name
,sdes.cpu_time
,sdes.logical_reads --optionally: + sdes.reads + sdes.writes
,sdes.last_request_start_time
,sdes.program_name
,sdes.session_id
,sder.request_id
,dest.[text]
FROM sys.dm_exec_sessions AS sdes
LEFT JOIN sys.dm_exec_connections AS sdec
ON sdes.session_id = sdec.session_id
JOIN sys.databases AS sdb
ON sdes.database_id = sdb.database_id
LEFT JOIN sys.dm_exec_requests AS sder
ON sdes.session_id = sder.session_id
CROSS APPLY sys.dm_exec_sql_text(sdec.most_recent_sql_handle) AS dest
WHERE 1=1
AND sdb.name = ''


Outcome



This produced four results tabs:




  • Results

  • Messages

  • Live Query Statistics

  • Execution Plan


Special Results Tab



When I switched to the Results tab, I noticed a result set just below the actual results which looks like this:



SQL Server Management Studio - Explain Plan





Observations



If I turn on either the Include Actual Execution Plan (Ctrl + M) option or the Include Live Query Statistics option, then the SQL Server Explain isn't displayed. The "SQL Server Explain" is only displayed if both options are turned on.





Questions




  1. Can this feature be turned on without having to activate both Include Actual Execution Plan (Ctrl + M) option and the Include Live Query Statistics?

  2. Where is this neat little feature documented?




Prerequisites



The following components and/or software packages are involved in the scenario:



Server




  • Windows Server 2016

  • SQL Server 2016 SP1


Client




  • Windows 10 Version 1807 (Build 17134)

  • SQL Server Management Studio v17.9


    • Microsoft SQL Server Management Studio 14.0.17285.0

    • Microsoft Analysis Services Client Tools 14.0.1016.283

    • Microsoft Data Access Components (MDAC) 10.0.17134.1

    • Microsoft MSXML 3.0 6.0

    • Microsoft Internet Explorer 9.11.17134.0

    • Microsoft .NET Framework 4.0.30319.42000

    • Operating System 6.3.17134




SQL Server Management Studio v17.9





  • Include Actual Execution Plan (Ctrl + M) turned ON


  • Include Live Query Statistics turned ON







sql-server ssms explain






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 at 12:38









hot2use

8,01752053




8,01752053












  • i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
    – Randi Vertongen
    Nov 28 at 12:50












  • It's also in 2016
    – RIanGillis
    Nov 29 at 15:44


















  • i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
    – Randi Vertongen
    Nov 28 at 12:50












  • It's also in 2016
    – RIanGillis
    Nov 29 at 15:44
















i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
– Randi Vertongen
Nov 28 at 12:50






i am reporting the same on 17.4, this seems to be around on earlier versions of ssms ibb.co/ZMP35fF
– Randi Vertongen
Nov 28 at 12:50














It's also in 2016
– RIanGillis
Nov 29 at 15:44




It's also in 2016
– RIanGillis
Nov 29 at 15:44










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted










No, not a feature - it's turning one of these on:



SET SHOWPLAN_TEXT ON;  
SET STATISTICS PROFILE ON;


The SHOWPLAN_TEXT option and STATISTICS PROFILE option are well-documented and have been around for over a decade, but I don't know when SSMS started turning it on for the combo of live query plans and actual plans. I would consider it a bug.



Here's the SSMS bug I filed for it.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f223647%2fdoes-sql-server-management-studio-2017-contain-a-new-explain-feature%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    6
    down vote



    accepted










    No, not a feature - it's turning one of these on:



    SET SHOWPLAN_TEXT ON;  
    SET STATISTICS PROFILE ON;


    The SHOWPLAN_TEXT option and STATISTICS PROFILE option are well-documented and have been around for over a decade, but I don't know when SSMS started turning it on for the combo of live query plans and actual plans. I would consider it a bug.



    Here's the SSMS bug I filed for it.






    share|improve this answer

























      up vote
      6
      down vote



      accepted










      No, not a feature - it's turning one of these on:



      SET SHOWPLAN_TEXT ON;  
      SET STATISTICS PROFILE ON;


      The SHOWPLAN_TEXT option and STATISTICS PROFILE option are well-documented and have been around for over a decade, but I don't know when SSMS started turning it on for the combo of live query plans and actual plans. I would consider it a bug.



      Here's the SSMS bug I filed for it.






      share|improve this answer























        up vote
        6
        down vote



        accepted







        up vote
        6
        down vote



        accepted






        No, not a feature - it's turning one of these on:



        SET SHOWPLAN_TEXT ON;  
        SET STATISTICS PROFILE ON;


        The SHOWPLAN_TEXT option and STATISTICS PROFILE option are well-documented and have been around for over a decade, but I don't know when SSMS started turning it on for the combo of live query plans and actual plans. I would consider it a bug.



        Here's the SSMS bug I filed for it.






        share|improve this answer












        No, not a feature - it's turning one of these on:



        SET SHOWPLAN_TEXT ON;  
        SET STATISTICS PROFILE ON;


        The SHOWPLAN_TEXT option and STATISTICS PROFILE option are well-documented and have been around for over a decade, but I don't know when SSMS started turning it on for the combo of live query plans and actual plans. I would consider it a bug.



        Here's the SSMS bug I filed for it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 28 at 12:56









        Brent Ozar

        33.6k1999229




        33.6k1999229






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f223647%2fdoes-sql-server-management-studio-2017-contain-a-new-explain-feature%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            If I really need a card on my start hand, how many mulligans make sense? [duplicate]

            Alcedinidae

            Can an atomic nucleus contain both particles and antiparticles? [duplicate]