码迷,mamicode.com
首页 > 其他好文 > 详细

cassandra best practise

时间:2016-12-02 03:27:35      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:locate   cal   range   cas   skin   other   contain   update   index   

modeling by query.

secondary index is best on table that has many rows the contain fewer unique values (low cardinality). but,

don‘t index on high-cardinality columns,

don‘t index in table which has a counter column,

don‘t index on a frequently updated or deleted column,

don‘t abuse the index to look for a row in a large partition

 

primary key 包含rowkeys, clustering columns. 

the colustering columns are used to locate a unique record, they are ordered, by default, and have the ability to use the order by clause in the select statements, as well as MIN, MAX, LIMIT

 

date bucket pattern, partitioning by date in row keys.

 

range query on partition: 使用token function。

 

if the primary column contains only one column, the row is skinny row, otherwise, the primary key contains more than one column, it‘s called wide row.

 

valueless column,即 column value可为null。

 

cassandra best practise

标签:locate   cal   range   cas   skin   other   contain   update   index   

原文地址:http://www.cnblogs.com/lukangping/p/6124238.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!