How to see the size of a table in a sql db from the ssms

Configurare noua (How To)

Situatie

Solutie

Pasi de urmat

Method 1: Using the GUI

  1. Connect to the database in SSMS
  2. Expand the database in the Object Explorer
  3. Expand the Tables folder
  4. Right-click on the table whose size you want to check and select Properties
  5. In the Properties window, go to the Storage page.
    • You will see information such as:
      • Data Space Used: Size of the data.
      • Index Space Used: Size of the indexes.

Method 2: Using the Built-In sp_spaceused Stored Procedure

  • Open a new query window in SSMS.
  • Run the following command:
    EXEC sp_spaceused ‘your_table_name’;
  • The output will show:
    • Reserved: Total space reserved for the table (data + index + unused)
    • Data: Space used by the table data
    • Index_size: Space used by indexes
    • Unused: Unused space within the table.

Tip solutie

Permanent

Voteaza

(0 din 0 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?