Rohit
Rohit

Reputation: 3638

Define 4000 columns but use 200 per row in Apache Cassandra?

Do we lose performance or gain disk size significantly if I define lots of columns but use few but different set per row?

Upvotes: 1

Views: 68

Answers (1)

jackiezhu
jackiezhu

Reputation: 422

You will not lose performance. In fact, it's actually quite efficient (depending on your use case) since empty columns don't take up any space. Whether or not you'll "gain" significant disk size is subjective. It's more about the disk space you'll be saving in place of the alternative method you would use to avoid empty columns.

"having columns without values is virtually free in Cassandra"

http://www.datastax.com/dev/blog/cql3_collections

Upvotes: 3

Related Questions