How Client Statistics helps in improving performance in SQL Server
How Client Statistics helps in improving performance in SQL Server
Time Statistics
Value of ‘Client processing time’ is 20 which indicates the time spent by the driver in processing.
Value of ‘wait time on server replies’ is 30 which indicates the waiting time for the driver spent to get the reply from the server.
Value of ‘Total execution time’ is sum of values of Client processing time + Wait time on server replies (20 + 30 = 50).
This is simple case of client statistics. To get some interesting information now let’s disable the Client statistics from the tab and execute the query one more time. Again enable the Client statistics from any method which is mentioned above and execute the query one more time.
Now one more Trail tab is added and also Red arrows increases. You will observe that values of Trail1 and Trail2 is almost identical while value Trial3 is totally different.
Why Trail3 values are different as we run the query only a single time after enabling the Client statistics?
The answer to this is – Trail3 value is the sum of number of execution of query when Client statistics was disabled and sum of the values when Client statistics was enabled again. Means, whenever a query gets executed it will added all the previous values till client statistics is enabled.
Values in Query profile statistics is showing the sum of previous execution value including query execution after enabling.
Value of Number of SELECT statement is 4 [2(Query executed when statistics was disabled) + 2 (Query executed when statistics enabled again)]
Same is with value of Rows returned by SELECT statement i.e. 34 [17 (When client statistics was disabled) + 17 (When query statistics enabled again)]
In Network statistics also values are showing values of sum of query execution when client statistics was disabled and sum of values when client statistics was enabled. You also see Red arrow signs which indicates the degradation in statistics when compare with Trial2.
Same calculation is with Time statistics.
How to reset/clear the Client statistics data?
Go to the Query tab >> Reset Client Statistics.
In summary, client statistics also helps you in analyzing the script performance by monitoring the response time of query, including client server execution time, data send in packets/bytes.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2020-06-20 哈佛大学公开课 幸福课 积极心理学
2019-06-20 Ajax
2019-06-20 jQuery FileUpload doesn't trigger 'done'
2019-06-20 Sending forms through JavaScript[form提交 form data]
2019-06-20 Sending form data
2019-06-20 Your first HTML form
2019-06-20 form submission