Blog Post

Space used by Individual tables in SQL Server

,

In an extensive database, tables use much space in SQL Server, and sometimes you don't know that until you check. This blog will run through the query to identify used space with the following data.

  • SchemaName
  • TableName
  • TableType.
  • FileGroupName
  • NumberOfPartitions
  • NumberOfRows
  • TotalDataPages
  • SizeOfDataPagesKB
  • NumberOfIndexes
  • NumberOfIndexPages
  • SizeOfIndexPagesKB.

You can execute the query on the required SQL Database ,https://github.com/rajendragp/RajendraScripts/blob/master/SpaceUsedbyTables.sql, and it gives the following data.

Space used by Individual tables in SQL Server

Original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating