You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Alexandr Porunov <al...@gmail.com> on 2016/09/08 11:23:44 UTC

Overhead of data types in cassandra

Hello,

Where can I find information about overhead of data types in cassandra?
I am interested about blob, text, uuid, timeuuid data types. Does a blob
type store a value with the length of the blob data? If yes then which type
of the length it is using (int, bigint)?
If I want to store 80 bits how much of disk space will be used for it? If I
want to store 64 bits is it better to use bigint?

Sincerely,
Alexandr

Re: Overhead of data types in cassandra

Posted by Eric Stevens <mi...@gmail.com>.
It's important to note that this answer differs quite significantly
depending on whether you're talking about Cassandra < 3.0 or >= 3.0

DataStax has a good article on < 3.0:
http://docs.datastax.com/en/cassandra/2.0/cassandra/architecture/architecturePlanningUserData_t.html
The Last Pickle has a good article on >= 3.0 (it's a lot more nuanced):
http://thelastpickle.com/blog/2016/03/04/introductiont-to-the-apache-cassandra-3-storage-engine.html

On Thu, Sep 8, 2016 at 12:12 PM Oleksandr Petrov <ol...@gmail.com>
wrote:

> You can find the information about that in Cassandra source code, for
> example. Search for serializers, like BytesSerializer:
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/serializers/BytesSerializer.java to
> get an idea how the data is serialized.
>
> But I'd also check out classes like Cell and SSTable structure to get an
> overview on what's the data layout.
>
> On Thu, Sep 8, 2016 at 4:23 AM Alexandr Porunov <
> alexandr.porunov@gmail.com> wrote:
>
>> Hello,
>>
>> Where can I find information about overhead of data types in cassandra?
>> I am interested about blob, text, uuid, timeuuid data types. Does a blob
>> type store a value with the length of the blob data? If yes then which type
>> of the length it is using (int, bigint)?
>> If I want to store 80 bits how much of disk space will be used for it? If
>> I want to store 64 bits is it better to use bigint?
>>
>> Sincerely,
>> Alexandr
>>
> --
> Alex Petrov
>

Re: Overhead of data types in cassandra

Posted by Oleksandr Petrov <ol...@gmail.com>.
You can find the information about that in Cassandra source code, for
example. Search for serializers, like BytesSerializer:
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/serializers/BytesSerializer.java
to
get an idea how the data is serialized.

But I'd also check out classes like Cell and SSTable structure to get an
overview on what's the data layout.

On Thu, Sep 8, 2016 at 4:23 AM Alexandr Porunov <al...@gmail.com>
wrote:

> Hello,
>
> Where can I find information about overhead of data types in cassandra?
> I am interested about blob, text, uuid, timeuuid data types. Does a blob
> type store a value with the length of the blob data? If yes then which type
> of the length it is using (int, bigint)?
> If I want to store 80 bits how much of disk space will be used for it? If
> I want to store 64 bits is it better to use bigint?
>
> Sincerely,
> Alexandr
>
-- 
Alex Petrov