You can use variable-length zig-zag coding to encode an interview if using a blob. It is used in able and protocol buffers. Some examples: valuehex 0 00 -1 01 1 02 -2 03 2 04 ... -64 7f 64 80 01 ...
On Sat, 10 Mar 2018, 07:52 onmstester onmstester, <onmstes...@zoho.com> wrote: > I've find out that blobs has no gain in storage saving! > I had some 16 digit number which been saved as bigint previously but by > saving this as blob, the storage usage per record is still the same > > Sent using Zoho Mail <https://www.zoho.com/mail/> > > > ---- On Tue, 06 Mar 2018 19:18:31 +0330 *Carl Mueller > <carl.muel...@smartthings.com <carl.muel...@smartthings.com>>* wrote ---- > > If you're willing to do the data type conversion in insert and retrieval, > the you could use blobs as a sort of "adaptive length int" AFAIK > > On Tue, Mar 6, 2018 at 6:02 AM, onmstester onmstester <onmstes...@zoho.com > > wrote: > > > I'm using int data type for one of my columns but for 99.99...% its data > never would be > 65K, Should i change it to smallint (It would save some > Gigabytes disks in a few months) or Cassandra Compression would take care > of it in storage? > What about blob data type ? Isn't better to use it in such cases? could i > alter column type from smallInt to int in future if needed? > > Sent using Zoho Mail <https://www.zoho.com/mail/> > > > >