Hi,

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

CREATE TABLE X (
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
1000;

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?

Reply via email to