Can someone please explain the difference between INT and VARINT data types in Cassandra. When should I use VARINT and what are its advantages ?
            Asked
            
        
        
            Active
            
        
            Viewed 4,293 times
        
    2 Answers
5
            
            
        As mentioned in the answer
and described in the Cassandra documentation, int is a 32-bit integer whereas varint is an arbitrary-precision integer implemented by java.math.BigInteger.  As such int will be smaller and faster compared to varint but limited in its range.
java.math.BigInteger has been discussed previously in these stack overflow questions:
        jq170727
        
- 13,159
 - 3
 - 46
 - 56