Problem:
How to know which
portion of the operator is currently executed, how is it possible to see the
control flow of a query?
Solution: Live Query Statistics - Display real-time statistics about query execution steps.
This is more helpful in trouble shooting.
If you are familiar with an execution plan of a query, usually it brings a graphical plan with operators that query processor but it doesn’t help in tracking the execution.
Starting from SQL Server 2016, This feature is available
in the tool box, right next to the actual query and estimated query plan. Once
we enable this it will show the tracking progress of a query execution in the
results window.
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.
OUTPUT:
In this example,
I would like to simulate a query operation and view live statistics of a query.
In this
screenshot, Step 1 to start writing a query and hit the include query live
statistics option.
In this
screenshot the process completes 100%.
0 comments:
Post a Comment