SqlServer数据文件增长也很快,到底是哪些表增长造成的呢?

查询数据库中所有表的大小,哪些表的数据量较大

create table #t
(name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20)) exec sp_MSforeachtable "insert into #t exec sp_spaceused '?'" select SUBSTRING(t.reserved, 0, CHARINDEX('KB', t.reserved)-1), *
from #t t
order by cast(SUBSTRING(t.reserved, 0, CHARINDEX('KB', t.reserved)-1) as int) desc drop table #t

上一篇:PAT A1026 Table Tennis (30 分)——队列


下一篇:MySQL多实例部署与优化