반응형
MSSQL 테이블별 용량 확인쿼리
SELECT
CONVERT (VARCHAR(30), MIN(o.name)) AS table_name ,
LTRIM(STR(SUM(reserved) * 8192.0 / 1024.0, 15, 0) + ' KB') AS table_size,
SUM(reserved) AS sum_reserved
FROM
sysindexes i, sysobjects o
WHERE
o.id = i.id
and i.indid IN (0, 1, 255) AND o.xtype = 'U'
GROUP BY
i.id
ORDER BY
sum_reserved desc
#테이블,#용량,#MSSQL
728x90
반응형
댓글