You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
The current schema won't hold up under real usage.
The partitions need a bucketing strategy applied so to prevent rows from ever growing. A time bucket resolution should be chosen so to avoid partitions larger than 100MB.
And the TimeWindowCompactionStrategy should be applied given this is a time-series datamodel.
For example:
CREATE TABLE snap.metrics (
time_bucket timestamp,
ns text,
ver int,
host text,
time timestamp,
boolval boolean,
doubleval double,
strval text,
tags map<text, text>,
valtype text,
PRIMARY KEY ((time_bucket, ns, ver, host), time)
) WITH CLUSTERING ORDER BY (time DESC)
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy'}';
CREATE TABLE snap.tags (
time_bucket timestamp,
key text,
val text,
time timestamp,
boolval boolean,
doubleval double,
host text,
ns text,
strval text,
tags map<text, text>,
valtype text,
ver int,
PRIMARY KEY ((time_bucket, key, val), time)
) WITH CLUSTERING ORDER BY (time DESC)
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy'}
The text was updated successfully, but these errors were encountered:
The current schema won't hold up under real usage.
The partitions need a bucketing strategy applied so to prevent rows from ever growing. A time bucket resolution should be chosen so to avoid partitions larger than 100MB.
And the TimeWindowCompactionStrategy should be applied given this is a time-series datamodel.
For example:
The text was updated successfully, but these errors were encountered: