ts178
ts178

Reputation: 329

Counter table in cassandra

Whats the point of having no non-key column in cassandra counter table?

I have a table with some key and non key column but I cannot keep a counter column....although I want the rows to be sorted based on some counter(hits).

If I create a separate table for counter, how do I relate two table for sorting?

thanks in advance

Upvotes: 1

Views: 324

Answers (1)

Jeff Jirsa
Jeff Jirsa

Reputation: 4426

Counters are a very different type of cell in cassandra internals. Everything about them is different than most other cassandra types. They require special care and it just isn't worth the complexity to be able to mix them in with other cells.

You can use the same primary key structure in two tables, one with counters and one with other cells/columns. You just can't have the other cells/columns in the counter table.

Upvotes: 2

Related Questions