We are trying to build a data-model for Cassandra and there is an option to save data with kind of path view instead of classic table/column view.
For example
CREATE TABLE data1 (
user uuid,
timestamp timeuuid,
column1 int,
column2 int
primary key (user, timestamp)
)
CREATE TABLE `data2` (
user uuid,
timestamp timeuuid,
column1 int,
column2 int
primary key (user, timestamp)
)
becomes one table like:
create table all_data (
user uuid,
timestamp timeuuid,
path text,
value blob
primary key (user, timestamp, path)
)
where we insert data as
insert into all_data (user, timestamp, path, value) values (1,0,'data1.column1',1)
insert into all_data (user, timestamp, path, value) values (1,0,'data1.column2',2)
insert into all_data (user, timestamp, path, value) values (1,9,'data2.column1',7)
insert into all_data (user, timestamp, path, value) values (1,9,'data2.column1',8)
It's somewhat similar to the way graphite collects statsd metrics and arguments to such model are to have kind of column based storage with better read performance for one column, since we almost never need to get whole row, but rather one column per user within time-range.
Does anyone have an experience with such data model and does it really have a better performance over classic one? Can you give any advice on this?