Reputation: 13930
As remembered here, when storing documents (suppose text
or xml
datatypes and EXTENDED storage) with more than 2k, it is compressed.
About table columns that was compressed, how to retrieve the compressed (binary format) of the column?
NOTE - Typical applications:
Operations as "long-term checksum of the document", like SHA256(compressed)
.
PS: as it is a matter of convention, not needs complementar compression, inheriting the condition, SHA256(less2k? text: compressed)
.
Coping or downloading compressed documents directally (without CPU consume).
PS: complementing operation (for "less than 2k row") with on-the-fly compression, when uniformity is required.
Upvotes: 0
Views: 196
Reputation: 246818
If this is possible at all, it would require writing a function in C.
Instead of going that way, I would recommend that you use EXTERNAL
rather than EXTENDED
storage and compress the data yourself before you store them in the database. That way you don't waste any space, and you can decide when to retrieve the compressed data and when to uncompress them.
Upvotes: 2