• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

A few new things in XML plan to help you troubleshoot query performance

May 5, 2017   BI News and Info

In this blog Added per-operator level performance stats for Query Processing, Senior PM in QP talks about extending operator level performance stats.  They include stats related to reads, CPU and elapse time.  These are very helpful to track down query performance issues.  We worked on recent case where we put ActualElapsedms in a good use.

In this case, customer stated a merge query ran very slowly and wanted us to help improve the performance. By examining ActualElapsedms  which is displayed as “Actual Elapsed Time(ms)”, we quickly found out which operator was taking most of the time.  In this case, it’s a “Distributed streams” parallel operator that caused most slowdown.  Upon further operation, the operator caused spill (‘exchange spill’).  so we were able to provide a relief to use serial plan. The original plan took over 20 minutes but serial plan took less than a 1 minute.  Knowing how where most of the time is spent will help you understand the issue sooner.

image thumb524 A few new things in XML plan to help you troubleshoot query performance

I also want to point out another improvement as documented in SQL 2016 SP1 release. We also added top wait stats for the query.  if your query runs slowly but consumes very little CPU, this will be a great help. In the past, the only way to get this is to use wait_info xevent.  Now it’s part of xml execution plan.  Below is an example of wait stats gathered from same plan as above.  Please note that you just have WaitStats for the entire query. You can search WaitStats in XML file.  But in SSMS, you will need to click on the very first node of the plan to get this property.

image thumb525 A few new things in XML plan to help you troubleshoot query performance


 
 
 
 
 
 
 
 
 
 

Note that you may not be able to see the above properties either in XML or SSMS.  That may be because you are not on the right version. Additionally, the fact that they are in the xml plan, you may not see them in SSMS if you are not using right version of SSMS.

For per operator level stats (such as logical reads, elapse time) to be included in the plan, you must be on SQL Server 2014 SP2 or SQL 2016 RTM.

For the top wait statis (WaitStats) to be included, you must be on SQL Server 2016 Sp1.

For both properties to show up in SSMS, you must be  latest SSMS (Nov 2016 or later release). you can get latest SSMS from Download SQL Server Management Studio (SSMS).

Jack Li |Senior Escalation Engineer | Microsoft SQL Server

twitter| pssdiag |Sql Nexus

Let’s block ads! (Why?)

CSS SQL Server Engineers

help, Performance, Plan, query, Things, Troubleshoot
  • Recent Posts

    • Accelerate Your Data Strategies and Investments to Stay Competitive in the Banking Sector
    • SQL Server Security – Fixed server and database roles
    • Teradata Named a Leader in Cloud Data Warehouse Evaluation by Independent Research Firm
    • Derivative of a norm
    • TODAY’S OPEN THREAD
  • Categories

  • Archives

    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited