【sqlserver】查詢 表的大小

renjixinchina發表於2012-08-31
select object_name(id) tablename,
8*reserved/1024 reserved,
rtrim(8*dpages/1024)+'Mb' used,
8*(reserved-dpages)/1024 unused,
8*dpages/1024-rows/1024*minlen/1024 free, 
rows,* from sysindexes 
where indid=1 
order by reserved desc 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15747463/viewspace-742388/,如需轉載,請註明出處,否則將追究法律責任。

相關文章