Skip to content

The COMPRESS() TSQL Function in SQL Server 2016+

'One cool little feature in SQL Server 2016 is COMPRESS(). It’s a TSQL function available in all editions that shrinks down data using the GZIP algorithm (documentation).

Things to know about COMPRESS():

  • Compressed data is in the VARBINARY(max) data type
  • You get the data “back to normal” by  using the DECOMPRESS function - which also outputs VARBINARY(max)
  • You can’t use columns of the VARBINARY(max) type in an index key column - but it may be useful to use the column as a filter in a filtered index, in some cases'...

https://sqlworkbooks.com/2017/07/the-compress-tsql-function-in-sql-server-2016/

Questions About SQL Server Collations You Were Too Shy to Ask

'Of course we all like our colleagues to think that we know everything there is to know about SQL Server Collations. However, the truth is that it is a rather complicated topic to fully understand and the cost of getting collation wrong can be great. If only one could ask certain questions on forums or at conferences without blushing. Help is at hand, because Robert Sheldon once again makes the complicated seem simple by answering those questions that you were too shy to ask'...

https://www.red-gate.com/simple-talk/sql/sql-development/questions-sql-server-collations-shy-ask/