question

JonathanBrotto-3536 avatar image
0 Votes"
JonathanBrotto-3536 asked SeeyaXi-msft commented

Statistics IO

I am new data admin and learning what my SQL 2019 box could do. My last job I was working with SQL 2005 box and reading on what I could do to improve performance. I saw Statistics IO and like some insight into that.

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JonathanBrotto-3536 ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

Best regards,
Seeya

0 Votes 0 ·
SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @JonathanBrotto-3536

Welcome to Microsoft Q&A!
In addition to the official documentation mentioned by Erland, I hope you will take a look at the following articles, which contain some explanations combined with examples and video that will help you better understand SET STATISTICS IO ON.
SQL Server: Performance Tuning :Understanding Set Statistics IO output
How to use Statistics IO to Improve Your Query Performance--which one contains video
Simple Query tuning with STATISTICS IO and Execution plans


Best regards,
Seeya


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

If you have a query which you want to investigate in terms of performance, you can do:

SET STATISTICS IO ON
go
-- Run query here
go
SET STATISTICS IO OFF

This can give some information how the query is running. Basically, the higher number, the worse performance. Although this is not the only metric to look at. Duration and CPU is also important.

Also see the documentation for SET STATISTICS IO ON.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.