incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Heller <>
Subject Re: Columns limit
Date Fri, 06 Aug 2010 23:50:07 GMT
> Thanks for the suggestion.
> I've somewhat understand all that, the point where my head begins to explode
> is when I want to figure out something like
> Continuing with your example: "Over the last X amount of days give me all
> the logs for remote_addr:XXX".
> I'm guessing I would need to create a separate index ColumnFamily???

Depending on your needs you can either insert them directly or pull
them out later in some map/reduce fashion. What you want is another
column Family and a similar structure.

ColumnFamily Standard "LogByRemoteAddrAndDate" CompareWith: TimeUUID

Row: "" Column TimeUUID/JSON as usual. If you want
to "link" to the actual log record (to avoid writing if multiple
times) just insert the same timeuuid you inserted into the other CF
and leave the value empty. So you have your "Index", aka list of
column names, and you can look up the actual values using get_slice
with column_names.

Confusing at first, but really quite simple once you get used to the
idea. Just alot more work then letting SQL do it for you. ;)


View raw message