Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

🚗 You set the rental price
🔐 Secure bookings with verified renters
📍 Track your vehicle with GPS integration
💰 Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

Query to check Tables row count and space details in SQL Server

The sp_spaceused stored procedure to retrieve the table size information:

EXEC sp_spaceused 'YourTableName'; Code language: JavaScript (javascript)

Replace ‘YourTableName’ with the name of the table you want to check. This will return a result set with information about the table’s total size, data space, index space, and unused space.

The sp_spaceused stored procedure returns a result set with the following column headers:

  1. name: The name of the table or indexed view.
  2. rows: The number of rows in the table or indexed view.
  3. reserved: The total amount of space reserved for the table or indexed view (in KB).
  4. data: The amount of space used by the data in the table or indexed view (in KB).
  5. index_size: The amount of space used by the indexes in the table or indexed view (in KB).
  6. unused: The amount of space reserved for the table or indexed view, but not currently used (in KB).

Here’s an explanation of each column:

  • name: This column displays the name of the table or indexed view.
  • rows: This column displays the number of rows in the table or indexed view.
  • reserved: This column displays the total amount of space reserved for the table or indexed view. This includes the space reserved for data, indexes, and unused space.
  • data: This column displays the amount of space used by the data in the table or indexed view. This includes the size of all data pages used by the table, including any clustered or non-clustered indexes.
  • index_size: This column displays the amount of space used by the indexes in the table or indexed view. This includes the size of all index pages used by the table, including any clustered or non-clustered indexes.
  • unused: This column displays the amount of space reserved for the table or indexed view, but not currently used. This includes any space that has been allocated to the table or indexed view, but has not yet been filled with data.

Note that the space usage reported by sp_spaceused includes all indexes associated with the table or indexed view, as well as any other objects (such as triggers or constraints) that may be defined on the table.

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x