Re: CQL Map vs clustering keys

2017-11-16 Thread eugene miretsky
Thanks! So assuming C* 3.0 and that my table stores only one collection, using clustering keys will be more performant? Extending this to sets - would doing something like this make sense? ( id UUID PRIMARY KEY, val text, PRIMARY KEY (id, val)) ); SELECT count(*) FROM TABLE WHERE id = 123

Re: CQL Map vs clustering keys

2017-11-15 Thread Jon Haddad
In 3.0, clustering columns are not actually part of the column name anymore. Yay. Aaron Morton wrote a detailed analysis of the 3.x storage engine here: http://thelastpickle.com/blog/2016/03/04/introductiont-to-the-apache-cassandra-3-storage-engine.html

Re: CQL Map vs clustering keys

2017-11-15 Thread DuyHai Doan
Yes, your remark is correct. However, once CASSANDRA-7396 (right now in 4.0 trunk) get released, you will be able to get a slice of map values using their (sorted) keys SELECT map[fromKey ... toKey] FROM TABLE ... Needless to say, it will be also possible to get a single element from the map by

CQL Map vs clustering keys

2017-11-15 Thread eugene miretsky
Hi, What would be the tradeoffs between using 1) Map ( id UUID PRIMARY KEY, myMap map ); 2) Clustering key ( id UUID PRIMARY KEY, key int, val text, PRIMARY KEY (id, key)) ); My understanding is that maps are stored very similarly to clustering columns, where the map key is part of t