incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Solovyov <>
Subject How wide rows are structured in CQL3
Date Fri, 22 Feb 2013 15:36:50 GMT

My impression from reading docs is that in old versions of Cassandra, you
could create very wide rows, say with timestamps as column names for time
series data, and read an ordered slice of the row.  So,

RowKey    Columns
=======  ======
RowKey1  1:val1 2:val2 3:val3 .... N:valN

With this data I think you could say "get RowKey1, cols 100 to 1000" and
get a slice of values. (I have no experience with this, just from reading
about it.)

In CQL3 it looks like this is kind of "normalized" so I would have

RowKey text,
TimeStamp int,
Value text,
PRIMARY KEY(RowKey, TimeStamp)

Does this effectively create the same storage structure?

Now, in CQL3, it looks like I should access it like this,

SELECT Value FROM X WHERE RowKey = 'RowKey1' AND TimeStamp BETWEEN 100 AND

Does this do the same thing?

I also don't understand some of the things like WITH COMPACT STORAGE and
CLUSTERING. I'm having a hard time figuring out how this maps to the
underlying storage. It is a little more abstract. I feel like the new CQL
stuff isn't really explained clearly to me -- is it just a query language
that accesses the same underlying structures, or is Cassandra's storage and
access model fundamentally different now?

View raw message