Home Forums SQL Server 2008 SQL Server 2008 - General If I compress a primary key, am I compressing the whole table --> P-key with DATA_COMPRESSION RE: If I compress a primary key, am I compressing the whole table --> P-key with DATA_COMPRESSION

  • GilaMonster (3/6/2013)


    SQLCharger (3/6/2013)


    If it is normally in memory anyway, you may decide to leave it uncompressed.

    Why?

    Gail,

    My tests have shown a performance degradation when the same queries run on compressed tables compared to uncompressed.

    I know, there are fewer pages to trawl across, but it is more expensive to crack them open as well - I've found the net effect to be negative (10-20% give or take).

    Especially with page compression, even if you have 1/3 of the pages (typical for many data tables) I've found it to still be quicker when having compression off. Looks like the access speed of each page goes down by a bit more than the size reduction.

    If there are exceptions to this I'd love to hear them, so I can fine-tune the algorithms.:cool:

    Cheers,

    JohnA

    MCM: SQL2008