Cassandra's "get_count" asymptotic time complexity
On the Cassandra's API descript开发者_如何学编程ion it is stated that get_count
is not O(1). What is it time complexity then? At most O(log(n)), I expect!
Looks O(n) to me. You have to count every column (though you don't necessarily go over the network every time).
Take a look at this discussion on the Cassandra JIRA, especially Jonathan Ellis's comment about why this is the case: it's a tradeoff.
精彩评论