So basically I'm doing a SQL select query, but I want to know how much data I am pulling back (how many kilobytes), any way?
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
You can include the actual execution plan of the query in the Results window of SSMS, which will display an estimated row size for the results. Multiply that by the number of rows to get your result. Not sure how accurate the estimated row size is, though.
Actually, "Show Client Statistics" within SSMS query Editor Window will return the resultset size, Bytes Received from Server, etc
This wlil Return Rows, Reserved Space, Data space (in KB), Index space, and unused space for that table.
You can use sp_spaceused to get the size of a table. But I am unaware of any way to get the size of a query (of course that means little).
One way to get a quick estimate of the size would be to save the data as a text file. Obviously, there will be extra whitespace. But it would give you a general idea on how large the query is.