1
我有一个SQL表,正在模拟cassandra运行不同的查询。更新性能cassandra
人
id primary key,
fname,
lname,
age
所有字段可以查询这样的IM创造多个表
Person_fname
fname primary key,
lname,
age,
id
Person_lname
lname primary key,
fname,
age,
id
Person_age
age primary key,
lname,
age,
fname
问题: -
1. If first_name is updated for a particular person, Should I need to update all the tables?
2. What would be the performance impact in CASSANDRA because of this update
很多谢谢..我同意,我添加了所有表的主键的id部分..现在它看起来不错吗? – user1050619
另外,这个Person表可能有10个属性,用户希望查询所有属性,并且即时计划为每种类型的查询创建10个表。由于cassandra建议设计表用于不同的查询......它是否真的使感? – user1050619
使用id列作为主键是正确的。但是创建10个表格仅用于不同列的查询没有多大意义。是的,cassandra不允许在所有字段上查询,对于您的情况,考虑将Solr或Elasticearch与Cassandra一起使用。插入或更新记录时,还要更新Solr/Elasticsearch索引,以便您可以使用Solr/Elasticsearch搜索API自由搜索。 –