首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cassandra二级索引

Cassandra二级索引
EN

Stack Overflow用户
提问于 2012-08-06 17:52:29
回答 1查看 368关注 0票数 0

我只想学习Cassandra,并尝试将RDBMS设计转换为Canssandra。考虑到我的应用程序正部署在多个数据中心。

数据库设计:

代码语言:javascript
复制
       A) CF : USER
              1) email_id - primary key
              2) fullname
              3) organization - ( I didnt create a separate table for organization )

       B) CF : ORG_USER

             1) organization - Primary Key
             2) email_id

             Here, my intention is to get users belong to an organization.
             Here, I can make the organization in the user table as secondary index, but heard that, this may hit the performance.
             Could you please clarify me which is the better approach?

谢谢,Baskar.S

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-08-29 21:06:18

只要基数较低,组织可能是二级索引的一个很好的候选者。换句话说,如果您有许多重复的组织值,请使用辅助索引。如果不是这样,手动构建索引(正如您在ORG_USER CF中指出的那样)是一种很好的方法。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11825983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档