I’m looking at altering a table with an IMAGE column. I’ll be changing it to VARBINARY(MAX), but I’m also considering compressing the data in this column in the hope that it will improve performance.
Here are the things I’m considering:
- Individual values are generally small but can be very large, up to several MB.
- The table sees relatively high query volume.
- Individual queries may retrieve hundreds of rows’ worth of data.
- Round-trip time on this query sometimes dominates application performance.
It’s more about reducing the amount of time it takes to get results back from a query than reducing table size, so compression would be done in the application rather than on the server. So, is it worth a shot, or will I be wasting my time?
If the content is something already compressed (images, videos, some PDF’s) then there will be little value in another compression layer on top of that.
If it is large bulk text, XML, etc., or something else which is very compressible, then there can be some real savings.