incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vicent Llongo <villo...@gmail.com>
Subject Timeseries with TTL
Date Sun, 06 Apr 2014 11:48:00 GMT
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!

Mime
View raw message