CQL3 and millions of columns combined key use case

How do we make millions of columns in CQL3? We have one special table in which all rows are mostly composite and very wide.

I read this question, which implied two ways. Are there certain restrictions in CQL3?

In addition, the types of our composite keys are String.bytes and are ordered by STring

We have an exact match table, which is Decimal.bytes and is ordered in decimal.

How to handle this in CQL3?

thanks dean

+1
source share
2 answers

", , SO . Decimal.bytes String.bytes .... " ", col, , > 10 < 20, , = 10 , 10.a, 10.b 11.c, 11.d, 11.e"

CREATE TABLE widerow
(    
   row_key text, //whatever
   column_composite1 decimal,
   column_composite2 text,
   PRIMARY KEY(row_key,column_composite1,column_composite2)
)

SELECT * FROM widerow WHERE row_key=... 
AND column_composite1>=10.0
AND column_composite1<=20.0

column_composite1 EACH column_composite1 column_composite2 (10.a, 10.b 11.c, 11.d, 11.e...)

" , row_composite1 > " a " row_composite1 <" b " , .. .

2

  • row_composite1
  • OrderPreservingPartitioner ( )

1

 CREATE TABLE widerow
    (    
       fake_row_key text, //whatever
       column_composite1 text, // previously row_composite1
       column_composite2 decimal,
       column_composite3 text,
       PRIMARY KEY(row_key,column_composite1,column_composite2,column_composite3)
    )

SELECT * FROM widerow WHERE row_key=... 
AND column_composite1>='a'
AND column_composite1<='b'

. DOUBLE, column_composite1:

SELECT * FROM widerow WHERE row_key=... 
AND column_composite1='a'
AND column_composite2>=10.0
AND column_composite2<=20.0
+1
CREATE TABLE widerow
(    
   row_composite1 text,
   row_composite2 text,
   column_name decimal,
   value text, 
   PRIMARY KEY((row_composite1,row_composite2),column_name)
)

SELECT * FROM widerow WHERE row_composite1=... 
AND row_composite2=...
AND column_name>=10.0
AND column_name<=20.0
ORDER BY column_name DESC
0

All Articles