Can someone please explain the difference between INT and VARINT data types in Cassandra. When should I use VARINT and what are its advantages ?
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With