I'm currently looking trying out Cassandra database. I'm using DataStax Dev center and DataStax C# driver.
My Current model is quite simple and consists of only:
- ParameterId (int) - would serve as the id of the table.
- Value (bigint)
- MeasureTime (timestamp)
I will be having 1000 (no more, no less) parameters, from 1 - 1000. And will be getting an entry for each parameter once pr. second and will be running for years.
My question is regarding whether it is better practice to create a table as:
CREATE TABLE keyspace.measurement (
parameterId int,
value bigint,
measureTime timestamp,
PRIMARY KEY(parameterId, measureTime)
) WITH CLUSTERING ORDER BY (measureTime DESC)
Or it would be better to create 1000 tables consisting only of a value and measureTime, and if so would I be able to range query on my MeasureTime?
See Question&Answers more detail:os