Home > Archive > MS SQL Server > December 2006 > Easy way to find size of data returned in SQL 2005 ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Easy way to find size of data returned in SQL 2005 ?
Hassan

2006-12-05, 5:16 am

Id like to know when i have a query that returns say 12 million rows as an
example, is there an easy way to find out how much of data that is in MB or
GB ?

Thanks


Kalen Delaney

2006-12-05, 5:16 am

Hassan

There's no automatic way. You could estimate the size of each row, and then
multiply by @@rowcount. Or capture the data in a temp table and use
sp_spaceused. Or find a tool that measures how much data is sent over the
network. There is a client statistics option in Query Analyzer and SSMS, but
I can't imagine you really want to send all 12 million rows to the client.

You've been asking lots of questions lately, and lots of people have been
providing answers. It would be nice to know if the answers you are getting
are useful to you.
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com


"Hassan" <Hassan@hotmail.com> wrote in message
news:OhXtCTDGHHA.2464@TK2MSFTNGP06.phx.gbl...
> Id like to know when i have a query that returns say 12 million rows as an
> example, is there an easy way to find out how much of data that is in MB
> or GB ?
>
> Thanks
>



Hari Prasad

2006-12-05, 7:12 pm

Hello,

My suggestion will be:-

Populate a sample of 2 million row into a temp table and then use
SP_SPaceused. After that you could take an average of size per record and
multiply by total returned. There
is no direct method to know this...

Thanks
Hari

"Hassan" <Hassan@hotmail.com> wrote in message
news:OhXtCTDGHHA.2464@TK2MSFTNGP06.phx.gbl...
> Id like to know when i have a query that returns say 12 million rows as an
> example, is there an easy way to find out how much of data that is in MB
> or GB ?
>
> Thanks
>



Hassan

2006-12-06, 12:12 am

Kalen,

I know at times it may appear that I am very thankless, but if not for the
newsgroup and the responses I get that have been very positive and
satisfactory, I wouldnt have been posting time and again out here.

Id love to thank all of the users for responding to not just my questions
but to others questions as well.

Keep up the good work..

"Kalen Delaney" < replies@public_newsg
roups.com> wrote in message
news:O0mQbYDGHHA.5104@TK2MSFTNGP03.phx.gbl...
> Hassan
>
> There's no automatic way. You could estimate the size of each row, and
> then multiply by @@rowcount. Or capture the data in a temp table and use
> sp_spaceused. Or find a tool that measures how much data is sent over the
> network. There is a client statistics option in Query Analyzer and SSMS,
> but I can't imagine you really want to send all 12 million rows to the
> client.
>
> You've been asking lots of questions lately, and lots of people have been
> providing answers. It would be nice to know if the answers you are getting
> are useful to you.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
>
> "Hassan" <Hassan@hotmail.com> wrote in message
> news:OhXtCTDGHHA.2464@TK2MSFTNGP06.phx.gbl...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com