This article is an effort to dissect the output of the sp_spaceused stored procedure.
Understanding the database usage internals and the growth trends play a vital role in the defining the right sizing of the database. sp_spaceused is probably an administrator’s most widely-executed system stored procedure to find the disk space used by a database. This helps get a quick glimpse of the database usage. statistics. sp_spaceused is used to display the number of rows, the data size, index size, amount of used space, unused space by each object, and the unallocated size of the database. Although looking at the values given by sp_spaceused, one shouldn’t think of shrinking the database or data file or log file. Many a time, we are unaware of what we are doing. Many a time, we don’t know what would be the aftereffects of doing such resource intrinsic operations. The output of sp_spaceused tells us a lot about the current performance of the database. The unallocated column and the unused column tell us the free space left at the database and the table levels.
This article considers:
- A peek into sp_spaceused
- Impact of the auto-growth setting on the columns, unallocated and unused
- Finding the space usage details at the database and the instance levels
- Measuring the auto-growth events
- Finding the mdf and ldf file sizes
- Factors determining the performance of the database
- And more…
Further reading, click the following link sp_spaceused
Thanks for reading my space!!