Do you know how long your query took to execution? Well, let us learn that today in today’s quick episode of SQL in Sixty Seconds. We will discuss SET STATISTICS TIME ON.
Earlier I blogged about SET STATISTICS IO ON – SQL in Sixty Seconds #128 and during that blog post I discussed how we can measure the IO for any query. Similarly, it is important to also learn how to measure the time taken by any query.
In this SQL in the Sixty Seconds video, we will learn how SET STATISTICS TIME ON works.
The command to enable TIME is as follows:
SET STATISTICS TIME ON
Here are a few recent SQL in Sixty Seconds Video:
- CONCAT and NULL – SQL in Sixty Seconds #123
- Sleeping vs Suspended Process – SQL in Sixty Seconds #122
- Pinned Tab – SSMS Efficiency Tip – SQL in Sixty Seconds #121
- Split Screen for SSMS Efficiency – SQL in Sixty Seconds #120
- Nonclustered Primary Key – SQL in Sixty Seconds #119
- Recent Execution of Stored Procedure – SQL in Sixty Seconds #118
- Full-Screen Execution Plan – SQL in Sixty Seconds #117
- Recover Crashed Query in SSMS – SQL in Sixty Seconds #116
- Activity Monitor and Running Query – SQL in Sixty Seconds #115
- Email an Execution Plan – SQL in Sixty Seconds #114
- Execution Plan – Estimated vs Actual – SQL in Sixty Seconds #113
- Who Dropped Your Table? – SQL in Sixty Seconds #112
- Single Column Single Row and TABLE SCAN – SQL in Sixty Seconds #111
- Dirty Read with NOLOCK – SQL in Sixty Seconds #110
- Undo Human Errors in SQL Server – SQL in Sixty Seconds #109 – Point in Time Restore
- Solve Puzzle about Data type – SQL in Sixty Seconds #108
- Move TempDB for Performance – SQL in Sixty Seconds #107
If you like what you see, I request you to subscribe to my YouTube Channel, where I discuss many such topics which you may find interesting. If you like any video on YouTube, you can always go back to your YouTube History and find the same video again easily.
Reference:Â Pinal Dave (https://blog.sqlauthority.com)