开发者

How to get a list of items when using cassandra

When using a nosql type datastore like Cassandra, how would you return a result set based on a column?

e.g.

SELECT *
FROM Articles
WHERE category='blah'
ORDER BY datetime DESC

is this something that you would store in a sql db and then pull the data from cassandra? Or can cassandra handle this type of query? (assuming millions of rows in a db)

From what I understand, cassandra is great at key based lookups, confused i开发者_StackOverflow中文版f it can and should be used for getting a list of data back and paging that data also (and if it is highly performant)


You create a CF whose keys are your categories, and whose columns are the articles in that category. Then lookup-by-category is just another lookup-by-key. Clients like lazyboy will automate this for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜