Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to find the size of data contained in a particular query?


I can use the following to find the number of rows per date:

select mydatecolumn, count(*) 
from MyTable
where mydatecolumn < '01-JAN-2014'
group by mydatecolumn

But is there a way to find out the size of the data that is contained in those rows?


select mydatecolumn, "sizeofactualdata",
from mytable
where mydatecolumn < '01-JAN-2014'
group by mydatecolumn

even if its one query per date that's not a problem.

share|improve this question
"Size" is not a property of "data". – Erwin Smout Apr 1 '14 at 9:42
I think you need to ask "How to calculate the Result Set data size ?" – Up_One Apr 1 '14 at 11:46
Probably a better way of putting it! – BlueChippy Apr 2 '14 at 11:33
up vote 2 down vote accepted

Here is a way of How to calculate the Result Set data size

If using Management Studio:
Go to Menu >> Query >> Include Client Statistics enter image description here
Once you enable the client statistics, it will display another tab in the result span; when clicked, we obtain the following: enter image description here

As shown in the image, it will capture details for different trials and they are compared with each other. Green arrows indicate improved statistics and red arrows indicate degrading statistics. Please note that here an increase does not always imply a good result; sometimes some statistics when marked as “up” can imply a bad result as well. For the same reason, they are colored in green and red, signifying good and bad results, respectively.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.