Non-clustered index compression

  • Hi,

    How do i find out if a nonclustered index is already compressed?

    Thanks

  • Same way as for the clustered index or heap

    SELECT t.name AS TableName, i.name AS IndexName, p.data_compression_desc

    FROM sys.tables AS t

    INNER JOIN sys.indexes AS i ON t.object_id = i.object_id

    INNER JOIN sys.partitions AS p ON i.object_id = p.object_id AND i.index_id = p.index_id

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Perfect, Many thanks!

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

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