Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

e.g.

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?

e.g.

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 at 9:42
1  
I think you need to ask "How to calculate the Result Set data size ?" –  Up_One Apr 1 at 11:46
    
Probably a better way of putting it! –  BlueChippy Apr 2 at 11:33

1 Answer 1

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

 
discard

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.