{"id":3838,"date":"2014-06-13T09:52:00","date_gmt":"2014-06-13T07:52:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/"},"modified":"2014-06-13T09:52:00","modified_gmt":"2014-06-13T07:52:00","slug":"sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/","title":{"rendered":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature"},"content":{"rendered":"<p><img decoding=\"async\" class=\"blog-image aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\" alt=\"\" \/><\/p>\n<p>Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named <strong>sys.dm_exec_query_profiles<\/strong>. This feature will help the database administrators and experienced developers to troubleshoot long running queries in real-time. I&#8217;m pretty sure you had to deal with the following questions: When will this query finish? What percentage of total workload is performed by this request? Which steps are the longest? Before SQL Server 2014 it was impossible to answer the questions above!<\/p>\n<p>But first, I have to admit that this new DMV has raised of lot of questions during my tests. I will try to share my thoughts and findings with you in this post.<\/p>\n<p>My test consisted of running this long query:<\/p>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">select<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS year_tran<span style=\"color: gray\">, <\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS month_tran<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FIRST_VALUE<span style=\"color: gray\">(p<span style=\"color: gray\">.ProductNumber<span style=\"color: gray\">) <span style=\"color: blue\">OVER <span style=\"color: gray\">(<span style=\"color: blue\">PARTITION <span style=\"color: blue\">BY <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">), <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">ORDER <span style=\"color: blue\">BY TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS first_product_nb<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LAST_VALUE<span style=\"color: gray\">(p<span style=\"color: gray\">.ProductNumber<span style=\"color: gray\">) <span style=\"color: blue\">OVER <span style=\"color: gray\">(<span style=\"color: blue\">PARTITION <span style=\"color: blue\">BY <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">), <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">ORDER <span style=\"color: blue\">BY TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS last_product_nb<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">from<span style=\"font-size: 9.5pt;font-family: Consolas\"> AdventureWorks2012<span style=\"color: gray\">.dbo<span style=\"color: gray\">.bigTransactionHistory <span style=\"color: blue\">as a<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">join AdventureWorks2012<span style=\"color: gray\">.dbo<span style=\"color: gray\">.bigProduct <span style=\"color: blue\">as p<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">on<span style=\"font-size: 9.5pt;font-family: Consolas\"> a<span style=\"color: gray\">.ProductID <span style=\"color: gray\">= p<span style=\"color: gray\">.ProductID<\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<p>On my computer this query takes 05\u2019\u201947\u2019 to run. The parallelism is enabled. My SQL Server instance can use up to 8 processors. The first time I was disappointed by viewing the output of the sys.dm_exec_query_profiles DMV during my query execution:<\/p>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">select<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: gray\">*<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">from<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: green\">sys<span style=\"color: gray\">.dm_exec_query_profiles<\/span><\/span><\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_1_-_output_sys_dm_exec_query_profiles.jpg\" alt=\"blog_12_-_1_-_output_sys_dm_exec_query_profiles\" width=\"611\" height=\"44\" \/><\/p>\n<p>\u2026 No output! Ok what are we supposed to do to see something with sys.dm_exec_query_profiles ? \ud83d\ude00\u00a0 Keep good habits and go back to the SQL Server <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dn223301.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">BOL<\/a> that says:<\/p>\n<p><strong>To serialize the requests of sys.dm_exec_query_profiles and return the final results to SHOWPLAN XML, use SET STATISTICS PROFILE ON; or SET STATISTICS XML ON;<\/strong><\/p>\n<p>In other words, to have a chance to see something with this DMV we must use some session options like <strong>STATISTICS PROFILE, STATISTICS XML<\/strong> or force SQL Server to display the execution plan after execution query with SQL Server Management Studio. My first though was: why do we have to use some additional options to produce some output for this new DMV? These constraints severely limit the scenarios where we can use this DMV \u2026 After some reflexions and discussions with others French MVPs we can think that is normal because tracking the execution plan information is expensive and we could potentially bring a production server to its knees by enabling this feature for all the workload statements. But using additional session options can be impractical in production environments because it requires to execute itself the concerned query and it is not always possible. Fortunately Microsoft provides the <strong>query_post_execution_showplan event<\/strong> which can be used into a SQL Server trace or an extended event session. But the implementation design of this event has a significant impact to the performance of a SQL Server instance. Indeed, even with a short-circuit predicate this event will be triggered each time a SQL statement will be executed because the query duration is not known ahead of time (please refer to this <a href=\"http:\/\/connect.microsoft.com\/SQLServer\/feedback\/details\/732870\/sqlserver-query-post-execution-showplan-performance-impact\">Microsoft connect item<\/a>). To summarize, using this event in OLTP production environment should be used in a short period for troubleshooting purposes. In OLAP environment the story is not the same because we don\u2019t have to deal with a lot of short queries but only with long running queries issued by cube processing or ETL processes for example.<\/p>\n<p>After discussing the pros and cons of this new feature let\u2019s start with my precedent T-SQL statement and the use of the session option: SET STATISTICS PROFILE ON<\/p>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">SET<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: blue\">STATISTICS <span style=\"color: blue\">PROFILE <span style=\"color: blue\">ON<span style=\"color: gray\">;<\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">select<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS year_tran<span style=\"color: gray\">, <\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS month_tran<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FIRST_VALUE<span style=\"color: gray\">(p<span style=\"color: gray\">.ProductNumber<span style=\"color: gray\">) <span style=\"color: blue\">OVER <span style=\"color: gray\">(<span style=\"color: blue\">PARTITION <span style=\"color: blue\">BY <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">), <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">ORDER <span style=\"color: blue\">BY TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS first_product_nb<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LAST_VALUE<span style=\"color: gray\">(p<span style=\"color: gray\">.ProductNumber<span style=\"color: gray\">) <span style=\"color: blue\">OVER <span style=\"color: gray\">(<span style=\"color: blue\">PARTITION <span style=\"color: blue\">BY <span style=\"color: fuchsia\">YEAR<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">), <span style=\"color: fuchsia\">MONTH<span style=\"color: gray\">(TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">ORDER <span style=\"color: blue\">BY TransactionDate<span style=\"color: gray\">) <span style=\"color: blue\">AS last_product_nb<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">from<span style=\"font-size: 9.5pt;font-family: Consolas\"> AdventureWorks2012<span style=\"color: gray\">.dbo<span style=\"color: gray\">.bigTransactionHistory <span style=\"color: blue\">as a<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">join AdventureWorks2012<span style=\"color: gray\">.dbo<span style=\"color: gray\">.bigProduct <span style=\"color: blue\">as p<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">on<span style=\"font-size: 9.5pt;font-family: Consolas\"> a<span style=\"color: gray\">.ProductID <span style=\"color: gray\">= p<span style=\"color: gray\">.ProductID<\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<p>In other session:<\/p>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">select<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: gray\">*<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">from<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: green\">sys<span style=\"color: gray\">.dm_exec_query_profiles<\/span><\/span><\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_2_-_output_sys_dm_exec_query_profiles_2.jpg\" alt=\"blog_12_-_2_-_output_sys_dm_exec_query_profiles_2\" width=\"618\" height=\"120\" \/><\/p>\n<p>This DMV provides a lot of useful information. These information are more granular than SET STATISTICS IO because\u00a0 the counters returned are per operator per thread (node_id \/ physical_operator_name and thread_id columns).\u00a0 In my case the SQL Server instance can use up to 8 processors and we can notice that for some operators (node_id) we have several threads using in parallel (thread_id). Furthermore two others columns are interesting like estimate_row_count and row_count. The former is the number of estimated rows an operator should address and the latter is the current number of rows addressed by the same operator (remember these counters are per operator per thread \u2026). We can compare these two columns to estimate a completion percentage per operator (or per operator per thread). Finally we can categorize some information provided by this DMV in two parts: information related either to the query execution engine (row_count, estimated_row_count) or the storage execution engine (logical_read_count, write_page_count, lob_logical_read_count etc.)<\/p>\n<p>As you can see, this DMV provide a lot of information to us and you will certainly customize the final output yourself depending on what you want to focus on.<\/p>\n<p>Here is an example of a custom script we can create that uses the sys.dm_exec_query_profiles, sys.objects, sys.indexes, sys.dm_exec_requets, sys.dm_exec_sessions, and sys.dm_os_waiting_tasks to cover both the real-time execution information and the related waits occurring in the same time.<\/p>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">USE<span style=\"font-size: 9.5pt;font-family: Consolas\"> AdventureWorks2012<span style=\"color: gray\">;<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">GO<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">SELECT<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 qp<span style=\"color: gray\">.node_id<span style=\"color: gray\">,<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 qp<span style=\"color: gray\">.session_id<span style=\"color: gray\">,<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 o<span style=\"color: gray\">.name <span style=\"color: blue\">AS [object_name]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 i<span style=\"color: gray\">.name <span style=\"color: blue\">AS index_name<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 qp<span style=\"color: gray\">.physical_operator_name <span style=\"color: gray\">+ <span style=\"color: fuchsia\">QUOTENAME<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">COUNT<span style=\"color: gray\">(qp<span style=\"color: gray\">.thread_id<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(4<span style=\"color: gray\">))) <span style=\"color: blue\">AS physical_operator_name<span style=\"color: gray\">, <\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.estimate_row_count<span style=\"color: gray\">) <span style=\"color: blue\">AS estimate_row_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.row_count<span style=\"color: gray\">) <span style=\"color: blue\">AS row_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">CASE <\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">WHEN <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.row_count<span style=\"color: gray\">) <span style=\"color: gray\">* 1. <span style=\"color: gray\">\/ <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.estimate_row_count <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: gray\">THEN <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.row_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/ <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.estimate_row_count <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217;<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">ELSE <span style=\"color: red\">&#8216;100 % + (&#8216; <span style=\"color: gray\">+ <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">((<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.row_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/ <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.estimate_row_count <span style=\"color: gray\">+ .00001<span style=\"color: gray\">)) <span style=\"color: gray\">&#8211; 100 <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %)&#8217;<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">END <span style=\"color: blue\">AS [completed_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: green\">&#8212; Query execution engine<\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.elapsed_time_ms<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.elapsed_time_ms<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [total_elapsed_time_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.cpu_time_ms<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.cpu_time_ms<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [total_cpu_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: green\">&#8212; Storage engine<\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.logical_read_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/ <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.logical_read_count<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001 <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [total_logical_read_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.physical_read_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.physical_read_count<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [total_physical_read_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_logical_read_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_logical_read_count<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [lob_logical_read_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_physical_read_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_physical_read_count<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [lob_physical_read_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.write_page_count<span style=\"color: gray\">) <span style=\"color: gray\">* 100. <span style=\"color: gray\">\/<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.write_page_count<span style=\"color: gray\">)) <span style=\"color: blue\">OVER<span style=\"color: gray\">() <span style=\"color: gray\">+ .00001<span style=\"color: gray\">) <span style=\"color: blue\">AS <span style=\"color: blue\">DECIMAL<span style=\"color: gray\">(5<span style=\"color: gray\">,2<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(6<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; %&#8217; <span style=\"color: blue\">AS [total_write_%]<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.logical_read_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_logical_read_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_logical_read_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_lob_logical_read_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_physical_read_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_lob_physical_read_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.lob_read_ahead_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_lob_read_ahead_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.physical_read_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_physical_read_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.read_ahead_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_read_ahead_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.write_page_count<span style=\"color: gray\">) <span style=\"color: blue\">AS total_write_page_count<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: green\">&#8212; Both<\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.cpu_time_ms<span style=\"color: gray\">) <span style=\"color: blue\">AS total_cpu_time_ms<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(qp<span style=\"color: gray\">.elapsed_time_ms<span style=\"color: gray\">) <span style=\"color: blue\">AS total_elapsed_time_ms<span style=\"color: gray\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"font-size: 9.5pt;font-family: Consolas;color: green\">&#8212; wait info information<\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">COALESCE<span style=\"color: gray\">(wait<span style=\"color: gray\">.wait_info<span style=\"color: gray\">, <span style=\"color: red\">&#8221;<span style=\"color: gray\">) <span style=\"color: blue\">AS wait_info<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">FROM<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: green\">sys<span style=\"color: gray\">.dm_exec_query_profiles <span style=\"color: blue\">AS qp<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">LEFT <span style=\"color: gray\">JOIN <span style=\"color: green\">sys<span style=\"color: gray\">.<span style=\"color: green\">objects <span style=\"color: blue\">AS o<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">ON qp<span style=\"color: gray\">.<span style=\"color: fuchsia\">object_id <span style=\"color: gray\">= o<span style=\"color: gray\">.<span style=\"color: fuchsia\">object_id<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">LEFT <span style=\"color: gray\">JOIN <span style=\"color: green\">sys<span style=\"color: gray\">.<span style=\"color: green\">indexes <span style=\"color: blue\">AS i<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">ON qp<span style=\"color: gray\">.index_id <span style=\"color: gray\">= i<span style=\"color: gray\">.index_id<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">AND qp<span style=\"color: gray\">.<span style=\"color: fuchsia\">object_id <span style=\"color: gray\">= i<span style=\"color: gray\">.<span style=\"color: fuchsia\">object_id<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">OUTER<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: gray\">APPLY<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">(<\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">SELECT <\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: fuchsia\">STUFF<span style=\"color: gray\">(<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">(<span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">SELECT<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: red\">&#8216;,&#8217; <span style=\"color: gray\">+ ws<span style=\"color: gray\">.wait_type <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; &#8216; <span style=\"color: gray\">+ <span style=\"color: fuchsia\">QUOTENAME<span style=\"color: gray\">(<span style=\"color: fuchsia\">CAST<span style=\"color: gray\">(<span style=\"color: fuchsia\">SUM<span style=\"color: gray\">(<span style=\"color: fuchsia\">COALESCE<span style=\"color: gray\">(ws<span style=\"color: gray\">.wait_duration_ms<span style=\"color: gray\">, 0<span style=\"color: gray\">)) <span style=\"color: blue\">AS <span style=\"color: blue\">VARCHAR<span style=\"color: gray\">(20<span style=\"color: gray\">)) <span style=\"color: gray\">+ <span style=\"color: red\">&#8216; ms&#8217;<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">FROM <span style=\"color: green\">sys<span style=\"color: gray\">.<span style=\"color: green\">dm_exec_requests <span style=\"color: blue\">AS r<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">JOIN <span style=\"color: green\">sys<span style=\"color: gray\">.<span style=\"color: green\">dm_exec_sessions <span style=\"color: blue\">AS s<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">ON r<span style=\"color: gray\">.session_id <span style=\"color: gray\">= s<span style=\"color: gray\">.session_id<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">JOIN <span style=\"color: green\">sys<span style=\"color: gray\">.<span style=\"color: green\">dm_os_waiting_tasks <span style=\"color: blue\">AS ws<span style=\"color: gray\">(<span style=\"color: blue\">NOLOCK<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">ON ws<span style=\"color: gray\">.session_id <span style=\"color: gray\">= s<span style=\"color: gray\">.session_id<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">WHERE s<span style=\"color: gray\">.session_id <span style=\"color: gray\">= qp<span style=\"color: gray\">.session_id<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">GROUP <span style=\"color: blue\">BY ws<span style=\"color: gray\">.wait_type<\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue\">FOR <span style=\"color: blue\">XML <span style=\"color: blue\">PATH <span style=\"color: gray\">(<span style=\"color: red\">&#8221;<span style=\"color: gray\">), <span style=\"color: blue\">TYPE<span style=\"color: gray\">).value<span style=\"color: gray\">(<span style=\"color: red\">&#8216;.&#8217;<span style=\"color: gray\">, <span style=\"color: red\">&#8216;varchar(max)&#8217;<span style=\"color: gray\">) <span style=\"color: gray\">, 1<span style=\"color: gray\">, 1<span style=\"color: gray\">, <span style=\"color: red\">&#8221;<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: gray\">)<\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">)<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: blue\">AS wait<span style=\"color: gray\">(wait_info<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">GROUP<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: blue\">BY qp<span style=\"color: gray\">.node_id<span style=\"color: gray\">, session_id<span style=\"color: gray\">, qp<span style=\"color: gray\">.physical_operator_name<span style=\"color: gray\">, o<span style=\"color: gray\">.name<span style=\"color: gray\">, i<span style=\"color: gray\">.name<span style=\"color: gray\">, <span style=\"color: fuchsia\">COALESCE<span style=\"color: gray\">(wait<span style=\"color: gray\">.wait_info<span style=\"color: gray\">, <span style=\"color: red\">&#8221;<span style=\"color: gray\">)<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">ORDER<span style=\"font-size: 9.5pt;font-family: Consolas\"> <span style=\"color: blue\">BY node_id<\/span><\/span><\/span><\/div>\n<div style=\"margin-bottom: 0.0001pt;line-height: normal;background: none repeat scroll 0% 0% #bfbfbf\"><span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">OPTION<span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">(<span style=\"font-size: 9.5pt;font-family: Consolas;color: blue\">RECOMPILE<span style=\"font-size: 9.5pt;font-family: Consolas;color: gray\">);<\/span><\/span><\/span><\/span><\/div>\n<p>The first section of the above script concerns the general information:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_2_-_output_sys_dm_exec_query_profiles_3.jpg\" alt=\"blog_12_-_2_-_output_sys_dm_exec_query_profiles_3\" width=\"629\" height=\"190\" \/><\/p>\n<ol>\n<li>This above script groups the information per operator. The information in brackets is the number of thread used for the concerned operator.<\/li>\n<li>Completion is provided as a ratio between rows addressed by the corresponding operator so far and the total estimated rows. As we can expect, the estimated rows and the real rows addressed by an operator can differ. The above script highlights this gap by showing the difference in percentage between brackets if row_count is greater than estimated_row_count. This information can be useful to \u201cestimate\u201d the general completion of the query.<\/li>\n<\/ol>\n<p>However Total_elasped_time_% and total_cpu_% columns are the relative percentage of the elapsed time and cpu time consumed by all the query execution operators.<\/p>\n<p>3. \u00a0For some physical operators like Clustered Index Scan, Table Scan etc \u2026 we will show the related table and index objects<\/p>\n<p>The second section concerns the storage engine statistic for the query execution:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_3_-_output_sys_dm_exec_query_profiles_4.jpg\" alt=\"blog_12_-_3_-_output_sys_dm_exec_query_profiles_4\" width=\"616\" height=\"296\" \/><\/p>\n<p>The above information can be useful to highlight the top operators depending on the resource or the operation type. For example, in my case I can notice that the cluster index scan of the bigTransactionHistory table is the main consuming physical operator for logical reads. Furthermore, we can observe that the sort operator is the root cause of spilling. Finally as expected we can notice that by design hash match operator consumes a lot of CPU and it\u2019s the top operator in this case.<\/p>\n<p>The next section shows the absolute values per operator per type of resources and operation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_4_-_output_sys_dm_exec_query_profiles_5.jpg\" alt=\"blog_12_-_4_-_output_sys_dm_exec_query_profiles_5\" width=\"628\" height=\"155\" \/><\/p>\n<p>Finally the last section shows the wait types and aggregated duration by all related threads in brackets during the query execution in a real time:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_12_-_5_-_output_sys_dm_exec_query_profiles_6.jpg\" alt=\"blog_12_-_5_-_output_sys_dm_exec_query_profiles_6\" width=\"228\" height=\"286\" \/><\/p>\n<p>In my case we retrieve the wait type related to a query execution in parallel\u00a0 (CXPACKET) and certainly one of the root cause of the CXPACKET wait type (IO_COMPLETION) but here we don&#8217;t have sufficient information to verify it. We can just notice that the query execution generates CXPACKET and IO_COMPLETION wait types in a real time.<\/p>\n<p>At this point we can ask why we don\u2019t have a remaining time information. In fact, computing an accurate remaining time is very difficult because a lot of factors must be correlated together. We can have a naive approach by computing the remaining time with the row_count, estimated_row_count and elapsed time columns for each operator, but you will be disappointed when testing this\u2026 According to my own tests, I can claim that the result is never as accurate as you would expect. Please feel free to share your results or thoughts about computing an accurate remaining time with us!<\/p>\n<p>The sys.dm_exec_query_profiles DMV can be correlated by external tools like XPERF or Perfmon. I will prepare a next blog post (as soon as I have some time) to share my experience with you.<\/p>\n<p>Happy query profiling!<\/p>\n<p><span style=\"float: none;background-color: #ffffff;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px;text-transform: none\">By David Barbarin<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles. This feature will help the database administrators and experienced developers to troubleshoot long running queries in real-time. I&#8217;m pretty sure you had to deal with the following questions: When will this query finish? What percentage of [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":3590,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[348,49,51,52,44],"type_dbi":[],"class_list":["post-3838","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-integration-middleware","tag-execution-plan","tag-microsoft","tag-sql-server","tag-sql-server-2014","tag-troubleshooting"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature - dbi Blog<\/title>\n<meta name=\"description\" content=\"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature\" \/>\n<meta property=\"og:description\" content=\"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-13T07:52:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"245\" \/>\n\t<meta property=\"og:image:height\" content=\"149\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature\",\"datePublished\":\"2014-06-13T07:52:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\"},\"wordCount\":1966,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\",\"keywords\":[\"Execution plan\",\"Microsoft\",\"SQL Server\",\"SQL Server 2014\",\"Troubleshooting\"],\"articleSection\":[\"Application integration &amp; Middleware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\",\"name\":\"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\",\"datePublished\":\"2014-06-13T07:52:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"description\":\"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg\",\"width\":245,\"height\":149},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature - dbi Blog","description":"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature","og_description":"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/","og_site_name":"dbi Blog","article_published_time":"2014-06-13T07:52:00+00:00","og_image":[{"width":245,"height":149,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg","type":"image\/jpeg"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature","datePublished":"2014-06-13T07:52:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/"},"wordCount":1966,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg","keywords":["Execution plan","Microsoft","SQL Server","SQL Server 2014","Troubleshooting"],"articleSection":["Application integration &amp; Middleware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/","name":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg","datePublished":"2014-06-13T07:52:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"description":"Among the hidden features provided by SQL Server 2014 there is a very interesting dynamic management view named sys.dm_exec_query_profiles.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_sqlserver2014.jpg","width":245,"height":149},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2014-sysdmexecqueryprofiles-a-new-promising-feature\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2014: sys.dm_exec_query_profiles, a new promising feature"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=3838"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3838\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/3590"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=3838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=3838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=3838"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=3838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}