How scalable are automatic secondary indexes in Cassandra 0.7?

徘徊边缘 提交于 2019-12-10 12:54:47

问题


As far as I understand automatic secondary indexes are generated for node local data.

In this case query by secondary index involve all nodes storing part of column family to get results (?) so (if i am right) if data is spread across 50 nodes then 50 nodes are involved in single query?

How far can this scale? Is this more scalable than manual secondary indexes (inverted index column family)? Few nodes or hundred nodes?


回答1:


See Stu's answer from the ml http://www.mail-archive.com/user@cassandra.apache.org/msg10506.html




回答2:


Yes, if you need to fetch all indexed rows, then the index queries involve all nodes. But this is actually more efficient, than building your own index! Details here.

However, if you lookup only a few rows, and each index entry maps to very many rows, then it's likely that the very first node is able to answer your question. Your query will then involve only one node. From the Apache mailing list:

The first node can answer the question as long as you've requested less rows than the first node has on it. Hence the "low cardinality" point in what you quoted.

(by Jonathan Ellis, here.)

(I also posted a question on the mailing list, a follow up question to your question, inquisitor, because I didn't really understand the answer to your question (linked in Schildmeijer's answer).)



来源:https://stackoverflow.com/questions/5068261/how-scalable-are-automatic-secondary-indexes-in-cassandra-0-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!