cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DuyHai Doan <doanduy...@gmail.com>
Subject Re: Number of columns per row for composite columns?
Date Wed, 13 Aug 2014 11:31:22 GMT
In your example it will be 4 physical columns


On Wed, Aug 13, 2014 at 8:43 AM, hlqv <hlqvuong@gmail.com> wrote:

> For more specifically, I declared a column family
>
> create column family Column_Family
>         with key_validation_class = UTF8Type
>         and comparator = 'CompositeType(LongType,UTF8Type)'
>         and default_validation_class = UTF8Type;
>
> Number of columns will depend on only first column name in composite
> column or both.
> For example,
> With row key  = 1, I have data
> 1 | 20140813, user1 | value1
> 1 | 20140813, user2 | value2
> 1 | 20140814, user1 | value3
> 1 | 20140814, user2 | value4
> (1: rowkey, "20140813, user1": composite column, "value1" : the value of
> column)
>
> So the number of columns of row key 1 will be 2 or 4? (2 for 20140813 and
> 20140814, 4 for each distinct composite column)
>
> Thank you so much
>
>
> On 13 August 2014 03:18, Jack Krupansky <jack@basetechnology.com> wrote:
>
>>   Your question is a little too tangled for me... Are you asking about
>> rows in a partition (some people call that a “storage row”) or columns per
>> row? The latter is simply the number of columns that you have declared in
>> your table.
>>
>> The total number of columns – or more properly, “cells” – in a partition
>> would be the number of rows you have inserted in that partition times the
>> number of columns you have declared in the table.
>>
>> If you need to review the terminology:
>>
>> http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows
>>
>> -- Jack Krupansky
>>
>>  *From:* hlqv <hlqvuong@gmail.com>
>> *Sent:* Tuesday, August 12, 2014 1:13 PM
>> *To:* user@cassandra.apache.org
>> *Subject:* Number of columns per row for composite columns?
>>
>>  Hi everyone,
>> I'm confused with number of columns in a row of Cassandra, as far as I
>> know there is 2 billions columns per row. Like that if I have a composite
>> column name in each row, for ex: (timestamp, userid), then number of
>> columns per row is the number of distinct 'timestamp' or each distinct
>> 'timestamp, userid' is a column?
>>
>
>

Mime
View raw message