开发者

How to get a list of items when using cassandra

开发者 https://www.devze.com 2022-12-25 03:47 出处:网络
When using a nosql type datastore like Cassandra, how would you return a result set based on a column?

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

精彩评论

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