Question about Row Compression and BIT Data

  • I've been reading about row compression, and I want to make sure I understand how it works with the BIT data type.

    I get that row compression is pretty useless with the BIT data type, and that the metadata adds three bits. So using row compression, the maximum number of bits you can store in a byte is 2, is that correct?

    Thanks.


    Peter MaloofServing Data

  • I'd say that you could still store 8 bits in a byte.

  • Lynn Pettis (5/10/2012)


    I'd say that you could still store 8 bits in a byte.

    Surly Yoda today 😛

    @peter-2

    It is unclear to me from BOL but I found this link:

    Lesson 2: Internal Structures, Vardecimal, & Row Compression

    Home work, go watch Paul Randal’s MCM videos . Take the Row Compression Demo and add some more columns and Fixed Length Data Types to it, and see what you can Compress. Happy Compressing!

    I do not have time to run through the video and homework at present. I am wondering if the compression of a BIT column is actually done on the BYTE designated to manage BIT columns on the row, not necessarily each BIT independently.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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