Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Finding table sizes

Author  Topic 

taraernst
Starting Member

9 Posts

Posted - 2006-09-12 : 14:25:58
I have run the following in Query Analyzer. A bit confused on the results.

select cast(object_name(id) as varchar(50)) AS name, sum(CASE WHEN indid<2 THEN rows END) AS rows,
sum(reserved)*8 AS reserved, sum(dpages)*8 AS data, sum(used-dpages)*8 AS index_size, sum(reserved-used)*8 AS unused
from sysindexes where indid in(0,1,255) and id>100
GROUP BY id with rollup
ORDER BY reserved desc

Here are the results. Not sure what the table 'NULL' is with 140483185 rows...

NULL 140483185 7865376 3660432 4203536 1408
FedNoCall 125229674 7013400 3252720 3760144 536
tblFloridaDNC 7697433 398808 183824 214920 64
tblMissouriDNC 2950992 166416 70472 95456 488
tblWisconsinDNC 2028277 146592 84080 62480 32
tblIndianaDNC 1813491 94040 43312 50664 64
tblOklahomaDNC 598187 31136 14288 16744 104
tblNoMail 65073 9224 9120 64 40
FedTest 100000 5728 2600 3048 80
tblStates 54 16 8 8 0
tblTestProper 4 16 8 8 0
dtproperties 0 0 0 0 0


X002548
Not Just a Number

15586 Posts

Posted - 2006-09-12 : 14:30:52
NULL is the sum of all tables...that's what ROLLUP does




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

taraernst
Starting Member

9 Posts

Posted - 2006-09-12 : 14:45:47
Thanks Brett!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-13 : 10:18:08
Also refer

http://sqlteam.com/forums/topic.asp?TOPIC_ID=61762

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -