how to find size of the index

  • sp_spaceused aaa

    go

    select * from sysindexes where id='229575856'

    go

    select (409*8) [clustered index]

    go

    select ( 248*8) [non clustered index ]

    go

     

    name                 rows        reserved           data               index_size         unused            

    -------------------- ----------- ------------------ ------------------ ------------------ ------------------

    aaa                  99999       5392 KB            3272 KB            2032 KB            88 KB

    dpages      reserved    used       

    ----------- ----------- -----------

    409         674         663

    248         256         251

    (2 row(s) affected)

               

    -----------

    3272

    (1 row(s) affected)

               

    -----------

    1984

    (1 row(s) affected)

    pl. give explanation as how is the size of the clustered index equal to the size of the table and hence what is the size of the non clustered index.

  • This was removed by the editor as SPAM

  • A clusterd index determines how that data is physically ordered in the table, and its leaf nodes contains the table data. 

    A good metaphor would be the dictionary.  The clustered index is on the keywords in the dictionary, and it's 'leaf nodes' are the description of the keywords.  A non-clustered index may be an index on the figures in the dictionary.

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply