【问题标题】:Cassandra Secondary IndexCassandra 二级索引
【发布时间】:2012-08-29 21:06:17
【问题描述】:

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

数据库设计:

       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?

谢谢, 巴斯卡尔.S

【问题讨论】:

    标签: indexing cassandra


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-25
      • 2016-06-29
      • 2013-09-30
      • 2018-07-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-23
      • 2015-11-09
      相关资源
      最近更新 更多