Table Compression

  • Anybody know of a query that can be used to determine if a table is compressed in SQL 2008?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Nevermind - found it.

    select * from sys.partitions

    where data_compression <> 0

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Well that was quick.

    Do you know about this one? http://msdn.microsoft.com/en-us/library/cc280574.aspx

  • Yup - have seen it in a few places. I wanted to be able to query the DB to find what tables I had compressed. This could be useful information to somebody new coming along. Just quickly query the DB to find what tables have been compressed and whether it is row or page.

    As a side - I compressed a few tables and was able to reduce a DB from 164GB to 104GB. Average space savings in those tables was ~70%. That was nice.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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