Sql-server – How does table compression affect SQL Server’s buffer pool

compressionmemorysql server

I'm curious as to how SQL Server's buffer pool is affected by compressed data tables.

Is the data in memory compressed, just as it is on disk, or is it fully decompressed?

If the data is stored compressed in the buffer pool, how much of the transient decompressed data is held in memory at a given time when executing a statement; a row/page, the entire table (assuming there is sufficient free pages to hold the data), or "it depends"?

Best Answer

When data is in the buffer pool it is compressed. The data within the row/column needs to be decompressed when the row/column is read. The storage engine team (the guys that wrote this stuff) did a blog post about this which has some good info in it. (Yes I stole the above line from the blog post.)