Hi there,

I have this table where I'm inserting timeseries values with a TTL of
86400*7 (1week):

CREATE TABLE metrics_5min (
  object_id varchar,
  metric varchar,
  ts timestamp,
  val double,
  PRIMARY KEY ((object_id, metric), ts)
)
WITH gc_grace_seconds = 86400
AND compaction = {'class': 'LeveledCompactionStrategy',
'sstable_size_in_mb' : 100};


With this structure is obvious that after one week inserting data, from
that moment there's gonna be new expired columns every 5 minutes in that
table. Because of that I've noticed that this table is being compacted
every 5 minutes.

Is that a good pattern for Cassandra? Is there some compaction tunings I
should take into account?

Thanks!

Reply via email to