Install
openclaw skills install cassandraDesign Cassandra tables, write efficient queries, and avoid distributed database pitfalls.
openclaw skills install cassandraPRIMARY KEY (a, b, c): a is partition key, b and c are clustering columnsPRIMARY KEY ((a, b), c): (a, b) together is partition key—compound partition keyWHERE must include full partition key—partial partition key fails unless ALLOW FILTERINGALLOW FILTERING scans all nodes—never use in production; redesign table insteadWHERE a = ? AND b > ? works, WHERE a = ? AND c > ? doesn'tIN on partition key hits multiple nodes—expensive; prefer single partition queriesQUORUM for most operations—majority of replicas; balances consistency and availabilityLOCAL_QUORUM for multi-datacenter—avoids cross-DC latencyONE for pure availability—may read stale data; fine for caches, bad for critical readsQUORUM + QUORUM safenodetool cfstats -H table—Tombstone columns show problemSELECT *—always list columns; schema changes break queriesIF NOT EXISTS / IF column = ?—uses Paxos, 4x slower than normal writeSERIAL or LOCAL_SERIAL[applied] boolean—must check if operation succeededSizeTieredCompactionStrategy (default)—good for write-heavy, uses more disk spaceLeveledCompactionStrategy—better read latency, higher write amplificationTimeWindowCompactionStrategy—for time-series with TTL; reduces tombstone overheadnodetool repair regularly—inconsistencies accumulate without repairnodetool status shows cluster health—UN (Up Normal) is good, DN is downnodetool describecluster to show agreement