Table and Index size in SQL Server

前端 未结 9 1183
-上瘾入骨i
-上瘾入骨i 2020-12-04 05:41

Can we have a SQL query which will basically help in viewing table and index sizes in SQl Server.

How SQL server maintains memory usage for tables/indexes?

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 06:08

    There is an extended stored procedure sp_spaceused that gets this information out. It's fairly convoluted to do it from the data dictionary, but This link fans out to a script that does it. This stackoverflow question has some fan-out to information on the underlying data structures that you can use to construct estimates of table and index sizes for capcity planning.

提交回复
热议问题