Skip to content

Commit 2badebe

Browse files
authored
Merge pull request #4952 from pmasl/patch-168
Update live-query-statistics.md
2 parents 3df7501 + 09073b0 commit 2badebe

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

docs/relational-databases/performance/live-query-statistics.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ ms.workload: "On Demand"
2626
---
2727
# Live Query Statistics
2828
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]
29-
[!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] provides the ability to view the live execution plan of an active query. This live query plan provides real-time insights into the query execution process as the controls flow from one query plan operator to another. The live query plan displays the overall query progress and operator-level run-time execution statistics such as the number of rows produced, elapsed time, operator progress, etc. Because this data is available in real time without needing to wait for the query to complete, these execution statistics are extremely useful for debugging query performance issues. This feature is available beginning with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)], however it can work with [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)].
29+
[!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] provides the ability to view the live execution plan of an active query. This live query plan provides real-time insights into the query execution process as the controls flow from one [query plan operator](../../relational-databases/showplan-logical-and-physical-operators-reference.md) to another. The live query plan displays the overall query progress and operator-level run-time execution statistics such as the number of rows produced, elapsed time, operator progress, etc. Because this data is available in real time without needing to wait for the query to complete, these execution statistics are extremely useful for debugging query performance issues. This feature is available beginning with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)], however it can work with [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)].
3030

31-
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [current version](http://go.microsoft.com/fwlink/p/?LinkId=299658)).
31+
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)]).
3232

3333
> [!WARNING]
34-
> This feature is primarily intended for troubleshooting purposes. Using this feature can moderately slow the overall query performance. This feature can be used with the [Transact-SQL Debugger](../../relational-databases/scripting/configure-firewall-rules-before-running-the-tsql-debugger.md).
34+
> This feature is primarily intended for troubleshooting purposes. Using this feature can moderately slow the overall query performance. This feature can be used with the [Transact-SQL Debugger](../../relational-databases/scripting/configure-firewall-rules-before-running-the-tsql-debugger.md).
3535
3636
#### To view live query statistics
3737

3838
1. To view the live query execution plan, on the tools menu click the **Live Query Statistics** icon.
3939

4040
![Live Query Stats button on toolbar](../../relational-databases/performance/media/livequerystatstoolbar.png "Live Query Stats button on toolbar")
4141

42-
You can also view access the live query execution plan by right clicking on a selected query in [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)] and then click **Include Live Query Statistics**.
42+
You can also view access the live query execution plan by right-clicking on a selected query in [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)] and then click **Include Live Query Statistics**.
4343

4444
![Live Query Stats button on popup menu](../../relational-databases/performance/media/livequerystatsmenu.png "Live Query Stats button on popup menu")
4545

@@ -54,15 +54,15 @@ ms.workload: "On Demand"
5454
## Remarks
5555
The statistics profile infrastructure must be enabled before live query statistics can capture information about the progress of queries. Specifying **Include Live Query Statistics** in [!INCLUDE[ssManStudio](../../includes/ssmanstudio-md.md)] enables the statistics infrastructure for the current query session.
5656

57-
Until [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], there are two other ways to enable the statistics infrastructure which can be used to view the live query statistics from other sessions (such as from Activity Monitor):
57+
Until [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], there are two other ways to enable the statistics infrastructure, which can be used to view the live query statistics from other sessions (such as from Activity Monitor):
5858

5959
- Execute `SET STATISTICS XML ON;` or `SET STATISTICS PROFILE ON;` in the target session.
6060

6161
or
6262

63-
- Enable the **query_post_execution_showplan** extended event. This is a server wide setting that enable live query statistics on all sessions. To enable extended events, see [Monitor System Activity Using Extended Events](../../relational-databases/extended-events/monitor-system-activity-using-extended-events.md).
63+
- Enable the **query_post_execution_showplan** extended event. This is a server-wide setting that enables live query statistics on all sessions. To enable extended events, see [Monitor System Activity Using Extended Events](../../relational-databases/extended-events/monitor-system-activity-using-extended-events.md).
6464

65-
Starting with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] SP1, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] includes a lightweight version of the statistics profile infrastructure. There are two ways to enable the lightweight statistics infrastructure which can be used to view the live query statistics from other sessions (such as from Activity Monitor):
65+
Starting with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] SP1, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] includes a lightweight version of the statistics profile infrastructure. There are two ways to enable the lightweight statistics infrastructure, which can be used to view the live query statistics from other sessions (such as from Activity Monitor):
6666

6767
- Use global trace flag 7412.
6868

@@ -77,11 +77,12 @@ Starting with [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] SP1, [!INCLUDE[s
7777
Requires the database level **SHOWPLAN** permission to populate the **Live Query Statistics** results page, the server level **VIEW SERVER STATE** permission to see the live statistics, and requires any permissions necessary to execute the query.
7878

7979
## See Also
80-
[Monitor and Tune for Performance](../../relational-databases/performance/monitor-and-tune-for-performance.md)
81-
[Performance Monitoring and Tuning Tools](../../relational-databases/performance/performance-monitoring-and-tuning-tools.md)
82-
[Open Activity Monitor (SQL Server Management Studio)](../../relational-databases/performance-monitor/open-activity-monitor-sql-server-management-studio.md)
83-
[Activity Monitor](../../relational-databases/performance-monitor/activity-monitor.md)
84-
[Monitoring Performance By Using the Query Store](../../relational-databases/performance/monitoring-performance-by-using-the-query-store.md)
85-
[sys.dm_exec_query_statistics_xml](../../relational-databases/system-dynamic-management-views/sys-dm-exec-query-statistics-xml-transact-sql.md)
86-
[sys.dm_exec_query_profiles](../../relational-databases/system-dynamic-management-views/sys-dm-exec-query-profiles-transact-sql.md)
87-
[Trace flags](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md)
80+
[Monitor and Tune for Performance](../../relational-databases/performance/monitor-and-tune-for-performance.md)
81+
[Performance Monitoring and Tuning Tools](../../relational-databases/performance/performance-monitoring-and-tuning-tools.md)
82+
[Open Activity Monitor (SQL Server Management Studio)](../../relational-databases/performance-monitor/open-activity-monitor-sql-server-management-studio.md)
83+
[Activity Monitor](../../relational-databases/performance-monitor/activity-monitor.md)
84+
[Monitoring Performance By Using the Query Store](../../relational-databases/performance/monitoring-performance-by-using-the-query-store.md)
85+
[sys.dm_exec_query_statistics_xml](../../relational-databases/system-dynamic-management-views/sys-dm-exec-query-statistics-xml-transact-sql.md)
86+
[sys.dm_exec_query_profiles](../../relational-databases/system-dynamic-management-views/sys-dm-exec-query-profiles-transact-sql.md)
87+
[Trace flags](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md)
88+
[Showplan Logical and Physical Operators Reference](../../relational-databases/showplan-logical-and-physical-operators-reference.md)

0 commit comments

Comments
 (0)