Hi,
I tried to create my data model for Cassandra, but i'm wondering about the best practices. I use on my model a User-defined type on a map collection, but some forums talked about composite column, which can be more efficient.
There is my model example :
Create table Account.user (
id_user uuid primary key,
name text,
list_data map<text, frozen <data>>); //about 160 000 insert per day
Create TYPE Account.data (
data1 text,
data2 text);
For list_data row, about 160 000 "data" type will be insert each day on the map collection. Is it efficient to use User-defined type with a map collection ? Or do i need to find another way with composite column ?
Thank you :)
You should start by asking the following questions:
list_data
list_data
?If you go through these answers, keep in mind the possible options (using clustering columns, using collections + UDTs), and some of their pros and cons (e.g. limit on the size of a list), you'll most probably get a good data model that you can start testing.