question

TZacks-2728 avatar image
0 Votes"
TZacks-2728 asked TZacks-2728 commented

SQL Server sp_spaceused usage

I used this query exec sp_spaceused 'TblZipContent' then got the result like

 name                   rows          reserved           data                    index_size         unused
 TblZipContent      5180099        566422672 KB    566421960 KB     24 KB           688 KB

1) what is reserved column? what it is showing ?
2) what is unused column ?

please guide me. thanks

sql-server-transact-sql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MelissaMa-msft avatar image
1 Vote"
MelissaMa-msft answered TZacks-2728 commented

Hi @TZacks-2728,

Please refer details from below:

  • reserved: space that is reserved for use by database objects =566422672 KB/1024=553174 MB

  • unused: portion of the reserved space, which is not yet used = 688 KB

Below is the simple formulae I came up with to better interpret the results.

  • used = data + index_size

  • reserved = used + unused

  • database_size = reserved + unallocated space + log space

You could also refer below picture.

114189-description.jpg

Please refer more details in this link.

Best regards,
Melissa


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



description.jpg (24.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you so much Madam for great explanation.

0 Votes 0 ·