0
我新手卡珊德拉,我需要一个表格模型存储城镇排序。在卡桑德拉
CREATE TABLE towns(
root text,
name text,
type text,
PRIMARY KEY(root,name)
) WITH CLUSTERING ORDER BY (name ASC);
INSERT INTO towns(root,name,type) VALUES('.','New York','city');
INSERT INTO towns(root,name,type) VALUES('.','London','city');
INSERT INTO towns(root,name,type) VALUES('.','Paris','city');
INSERT INTO towns(root,name,type) VALUES('.','Tokio','city');
是,要得到记录排序在卡桑德拉城镇的名字递增的唯一途径?
我试着模拟表如下:
CREATE TABLE towns(
name text,
type text,
PRIMARY KEY(name)
);
但需要我永远无法城镇排序。
我agree.Thanks你的答案。 – ejq11827 2014-08-29 10:40:35
如果在这种情况下指定20的复制因子,该怎么办? – ejq11827 2014-08-29 11:15:15
然后你仍然在使用卡桑德拉的方式不好。射频的想法是没有单点故障,不让每个节点拥有相同的数据 – 2014-08-29 11:16:19