選擇適合卡桑德拉「表」正確的模式,我們正在努力存儲大量的屬性爲表內的特定PROFILE_ID(使用CQL3),並不能完成我們的頭周圍哪種方法是最好的:在CQL3
一。 create table mytable(profile_id,a1 int,a2 int,a3 int,a4 int ... a3000 int)主鍵(profile_id);
或
b。創建很多表,例如。 create table mytable_a1(profile_id,value int)主鍵(profile_id); create table mytable_a2(profile_id,value int)主鍵(profile_id); ... create table mytable_a3000(profile_id,value int)主鍵(profile_id);
或
c。 create table mytable(profile_id,a_all text)主鍵(profile_id); (1,「a1:1,a2:5,a3:55,.... a3000:5」)插入到mytable(profile_id,a_all)中; ,並且只存儲a_all中的3000個「列」,如: ;
或
d。以上都不是
的類型,我們會在這個表上運行查詢的: SELECT * FROM MYTABLE其中PROFILE_ID在(1,2,3,4,5423,44)
我們嘗試第一種方法並且查詢保持超時,有時甚至殺死cassandra節點。