SELECT table_name = convert(varchar(30), min(o.name))
, table_size = ltrim(str(sum(cast(reserved as bigint)) * 8192 / 1024.,15,0) + 'KB')
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
SELECT table_name = convert(varchar(30), min(o.name))
, table_size = convert(int, ltrim(str(sum(cast(reserved as bigint)) * 8192 / 1024., 15, 0))), UNIT = 'KB'
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 table_size DESC
SELECT o.name
, i.rows
FROM sysindexes i
INNER JOIN
sysobjects o
ON i.id = o.id
WHERE i.indid < 2
AND o.xtype = 'U'
ORDER BY i.id
RPAD 구현 (0) | 2014.09.18 |
---|---|
varchar 와 nvarchar (0) | 2014.07.16 |
칼럼 Comment (0) | 2014.04.03 |
인덱스 구성 컬럼 추출 쿼리 (0) | 2014.04.01 |
테이블 용량 확인 및 레코드수 조회 쿼리 (0) | 2014.04.01 |