Cassandra的0.7二级索引如何存储? [英] How are Cassandra's 0.7 Secondary Indexes stored?

查看:106
本文介绍了Cassandra的0.7二级索引如何存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直使用Cassandra 0.6,现在拥有数百万个键的列族。我们有兴趣使用0.7中提供的新的二级索引功能,但找不到任何关于如何存储新索引的文档。



是否有任何磁盘空间限制或存储的类似于键的索引,它分布在多个节点上?



我尝试通过Cassandra网站梳理一个答案,但没有效果。

解决方案

二级索引存储为用户无法访问的列族。它们的大小大致为:



(索引值集合的基数*索引值的平均大小)+(索引列系列中的键数量*列族中键的平均大小)。



节点只会存储在本地存储的索引行 - 即只有它们是副本的行。 p>

We have been using Cassandra 0.6 and now have Column Families with millions of keys. We are interested in using the new Secondary Index feature available in the 0.7 but couldn't find any documentation on how the new index is stored.

Is there any disk-space limitation or is the index stored similar to keys in that it's spread over multiple nodes?

I've tried combing through the Cassandra site for an answer but to no avail.

解决方案

Secondary indexes are stored as Column Families that are not accessible by the user. Their size will roughly be:

(cardinality of the set of indexed values * the avg size of the index values) + (the number of keys in the indexed column family * the avg size of keys in the column family).

Nodes only index rows that are stored locally -- that is, only rows for which they are a replica.

这篇关于Cassandra的0.7二级索引如何存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆