问题
I have a row of counters and I want to get its' columns sorted by values. Is there any strategies or data models for that?
回答1:
I'm afraid there is no way of having Cassandra do this for you; you will need to get the entire row from Cassandra (paging for large rows) and sort it in the client.
You could use a periodic MapReduce job to do this for you, and cache the result of the job back into Cassandra, if your solution can cope with non-uptodate results.
来源:https://stackoverflow.com/questions/8428364/how-to-get-sorted-counters-from-cassandra