CQL Schema and Timeseries

I am trying to simulate timers data for a sensor network in Cassandra 11x. My main use case is to request large time ranges from a specific source. I would prefer to use cql for this to save runtime.

Using cql3, I define the table as follows:

create table example ( source int, sample_time timeuuid, value double, PRIMARY KEY (source,sample_time) ); 

But this section key causes the rows to grow too wide / hot too quickly and will not parallelize queries. Ideally, I would like to define the compositetype type as my section key, is this supported in cql?

I read http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra and the section on high-speed timelines is especially relevant. Should I go back to locating the storage directly and forget about cql?

+4
source share
1 answer

This requires Cassandra 1.2:

 CREATE TABLE foo ( a int, b text, c uuid, PRIMARY KEY ((a, b)) ); 

will provide you with a repository core string key made up of int, text.

+3
source

Source: https://habr.com/ru/post/1447576/


All Articles