Re: CQL 3 and wide rows

2014-05-20 Thread Aaron Morton
In a CQL 3 table the only **column** names are the ones defined in the table, in the example below there are three column names. CREATE TABLE keyspace.widerow ( row_key text, wide_row_column text, data_column text, PRIMARY KEY (row_key, wide_row_column)); Check out, for example,

Re: CQL 3 and wide rows

2014-05-20 Thread Jack Krupansky
To: Cassandra User Subject: Re: CQL 3 and wide rows In a CQL 3 table the only **column** names are the ones defined in the table, in the example below there are three column names. CREATE TABLE keyspace.widerow ( row_key text, wide_row_column text, data_column text

Re: CQL 3 and wide rows

2014-05-20 Thread Maciej Miklas
primary key”. -- Jack Krupansky From: Aaron Morton Sent: Tuesday, May 20, 2014 3:06 AM To: Cassandra User Subject: Re: CQL 3 and wide rows In a CQL 3 table the only **column** names are the ones defined in the table, in the example below there are three column names. CREATE TABLE

Re: CQL 3 and wide rows

2014-05-20 Thread Maciej Miklas
Hi Aron, Thanks for the answer! Lest consider such CLI code: for(int i = 0 ; i 10_000_000 ; i++) { set[‘rowKey1’][‘myCol::i’] = UUID.randomUUID(); } The code above will create single row, that contains 10^6 columns sorted by ‘i’. This will work fine, and this is the wide row to my

Re: CQL 3 and wide rows

2014-05-20 Thread Nate McCall
Something like this might work: cqlsh:my_keyspace CREATE TABLE my_widerow ( ... id text, ... my_col timeuuid, ... PRIMARY KEY (id, my_col) ... ) WITH caching='KEYS_ONLY' AND ... compaction={'class':

Re: CQL 3 and wide rows

2014-05-20 Thread Maciej Miklas
Thank you Nate - now I understand it ! This is real improvement when compared to CLI :) Regards, Maciej On 20 May 2014, at 17:16, Nate McCall n...@thelastpickle.com wrote: Something like this might work: cqlsh:my_keyspace CREATE TABLE my_widerow ( ... id text,

RE: CQL 3 and wide rows

2014-05-19 Thread James Campbell
Maciej, In CQL3 wide rows are expected to be created using clustering columns. So while the schema will have a relatively smaller number of named columns, the effect is a wide row. For example: CREATE TABLE keyspace.widerow ( row_key text, wide_row_column text, data_column text,

Re: CQL 3 and wide rows

2014-05-19 Thread Jack Krupansky
You might want to review this blog post on supporting dynamic columns in CQL3, which points out that “the way to model dynamic cells in CQL is with a compound primary key.” See: http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows -- Jack Krupansky From: Maciej Miklas

Re: CQL 3 and wide rows

2014-05-19 Thread Maciej Miklas
Hallo Jack, You have given a perfect example for wide row. Each reading from sensor creates new column within a row. It was also possible with Hector/CLI to have millions of columns within a single row. According to this page http://wiki.apache.org/cassandra/CassandraLimitations single row

Re: CQL 3 and wide rows

2014-05-19 Thread Maciej Miklas
Hi James, Clustering is based on rows. I think that you meant not clustering columns, but compound columns. Still all columns belong to single table and are stored within single folder on one computer. And it looks to me (but I’am not sure) that CQL 3 driver loads all column names into memory