Menu & Search
How to Check Table Sizes in SQL Server

How to Check Table Sizes in SQL Server


There are many ways to check the size of a table in SQL Server. The way you’ll do it will likely depend on what you’re task at hand is. For example, a quick look at the Disk Usage by Top Tables report on a database you’ve never seen before would instantly show you the heavy tables. But if you wanted that information saved somewhere else, it’s a quick job to output to Excel or a table using a SQL script.

Below is a few methods of how you can check tables sizes in SQL Server;

# Disk Usage by Top Tables Report.
# Table Properties.
# Sp_spaceused.
# SQL Script.


Disk Usage by Top Tables

Right-click a database, select Reports, Standard Reports and Disk Usage by Top Tables.

Disk Usage by Top Tables SSMS

The report shows that this database has 2 tables close to 700MB in size, both containing the same number of rows but there are some differences in the indexes.

Disk Usage by Top Tables Report

Table Properties

We can get more information by looking at these tables within the Object Explorer.

Right click a table and select Properties.

Table Properties SSMS

Within the Storage tab we’ll see more of the same disk usage info as above, including overall table disk space, index space and row counts.

Table Properties Storage

Sytem Stored Proc (sp_spaceused)

Another way to check this information is by running the sp_spaceused system stored procedure.

sp_spaceused

SQL Script

Or, you can query the system tables.

Get Index Info SQL Script

That’s it for now on this!