sql-server-如何在SQL Server中查找查询的网络流量? [英] how to find out network traffic for a query in sql server?
本文介绍了sql-server-如何在SQL Server中查找查询的网络流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
sql server中是否有任何可能的方法来找出单个select语句多少字节/KB?
Is there any possible ways in sql server to find out how many bytes/KBs for a single select statement?
推荐答案
我不确定您将如何获得它以字节为单位.但是要了解查询的性能效率,可以使用sql server profiler.
要知道哪些查询会导致过多的流量
跟随链接,
http://dba. stackexchange.com/questions/756/find-out-what-queries-are-causing-the-biggest-amount-of-network-traffic [ ^ ]
要监视网络性能,请单击此链接
http://social.msdn.microsoft.com /Forums/zh-CN/adodotnetentityframework/thread/68e33a4b-1b70-4f22-8531-6b86d834ac65/ [
I am not sure how you will get it in bytes. But to know the performance eficiency of a query you can use sql server profiler.
To know which queries causes too much traffic
follow ths link,
http://dba.stackexchange.com/questions/756/find-out-what-queries-are-causing-the-biggest-amount-of-network-traffic[^]
To monitor network performance, follow this link
http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/68e33a4b-1b70-4f22-8531-6b86d834ac65/[^]
Another way of calculating the size of data you querying is insert into table and use the sp_spaceused.
For eg.If i have a query
SELECT * FROM employee where YEAR(InsertDate)=2012
我想知道要提取多少数据.
对于Taht,我将这些插入到temp表中并使用sp_spaceused.
I want to know how much data its going to fetch.
For taht i am going to insert these into temp table and use sp_spaceused.
SELECT *
INTO dbo.temptable
FROM employee where YEAR(InsertDate)=2012
exec sp_spaceused temptable
DROP TABLE temptable
查看一些链接那..
http://msdn.microsoft.com/en-us/library/ms143432.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/ms172984.aspx [ ^ ]
http://stackoverflow.com/questions/4473023/sql-finding-the-查询结果大小 [ ^ ]
See some links over that..
http://msdn.microsoft.com/en-us/library/ms143432.aspx[^]
http://msdn.microsoft.com/en-us/library/ms172984.aspx[^]
http://stackoverflow.com/questions/4473023/sql-finding-the-size-of-query-result[^]
这篇关于sql-server-如何在SQL Server中查找查询的网络流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文