How to measure the cost of a T-SQL query on a wire?

How can I calculate the size of a T-SQL query in bytes transmitted over the network?

I know that I can approximate it by examining the data types of columns (although varchars is an interesting twist), but there are tools that will give me the number of bytes (including and excluding TCP / IP headers), the query used and its results in SQL Server and back?

+3
source share
1 answer

If you are using Microsoft Sql Server Management Studio, you can switch "Enable client statistics" from the "Request" menu.

You will get network statistics, for example

  • Bytes sent from the client
  • Bytes received from the server
  • TDS,

.

+10

Source: https://habr.com/ru/post/1726244/


All Articles