테이블별 용량 size 크기 확인 쿼리

select top 10
 table_name = convert(varchar(30), min(o.name))
 , table_size = convert(int, ltrim(str(sum(reserved) * 8.192 / 1024., 15, 0))), UNIT = 'MB'
from sysindexes i
 inner join sysobjects o on (o.id = i.id)
where i.indid in (0, 1, 255)
 and o.xtype = 'U'
group by i.id
order by 2 desc
Previous
Next Post »