I found a significant performance problem when using composite primary key, "wide" row and BATCH.
Ideally, I would like to have following structure:
CREATE TABLE bar1 (
PRIMARY KEY((some_id, some_type), some_value)
For each (some_id, some_type) there might be hundreds of thousands columns. However, storing them gets incredibly slow....
So I played with the structure and used something like that (concatenating some_type and some_value together) :
CREATE TABLE bar2 (
PRIMARY KEY((some_id, some_type))
The speedup was unbelievable. I made some more tests, using BATCH vs executing each statement separately. 10 000 entries took following time (seconds):
Using composite keys
Using just partition key and wide row
So using BATCH for composite key was roughly 2000 times slower than it should be, making it pretty much unusable.