Determine SQL Server table size ‘sp_spaceused’

1
15

to find SQL Server table size

EXEC sp_spaceused ‘table_name’

will produce output like below

name      rows        reserved           data               index_size         unused
user_ids  523538      15744 KB           15712 KB           8 KB               24 KB

  • name: Table name for which space usage information was requested
  • rows: Number of rows existing in the table
  • reserved: Total amount of reserved space for table data and indexes
  • data: Amount of space used by table data
  • index_size: Amount of space used by table indexes
  • unused: Total amount of space reserved for table but no yet used

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here