You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by Apache Wiki <wi...@apache.org> on 2012/09/14 23:12:37 UTC

[Cassandra Wiki] Trivial Update of "SecondaryIndexes" by AndrewCooper

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "SecondaryIndexes" page has been changed by AndrewCooper:
http://wiki.apache.org/cassandra/SecondaryIndexes?action=diff&rev1=4&rev2=5

Comment:
Punctuation.

  '''Articles/Blogs'''
-  * A good article by Jonathan Ellis: http://www.datastax.com/dev/blog/whats-new-cassandra-07-secondary-indexes
+  * A good article by Jonathan Ellis: http://www.datastax.com/dev/blog/whats-new-cassandra-07-secondary-indexes.
  
  '''FAQ for Secondary Indexes'''
  
-  * Q: Are there any limitations beside the hash properties (no between queries)? Like size or memory, etc?
+  * Q: Are there any limitations beside the hash properties (no range queries), like size, memory, ''etc''.?
     A: No.
  
   * Q: Are they distributed? If so, how does that work? How are they stored on the nodes?
     A: Each node only indexes data that it holds locally.
  
-  * Q: When you write a new row, when/how does the index get updated? What I would like to know is the atomicity of the operation, is the "index write" part of the "row write"?
+  * Q: When you write a new row, when/how does the index get updated? What I would like to know is the atomicity of the operation--is the "index write" part of the "row write"?
-    A: The row and index updates are one atomic operation.
+    A: The row and index updates are one, atomic operation.
  
   * Q: Is there a difference between creating a secondary index vs creating an "index" CF manually such as "users_by_country"?
     A: Yes. First, when creating your own index, a node may index data held by another node. Second, updates to the index and data are not atomic.
  
   * Q: Why is it necessary to always have at least one EQ comparison on secondary indices?
-    A: Inequalities on secondary indices are always done in memory, so without at least one EQ on another secondary index you will be loading every row in the database, which with a massive database isn't a good idea. So by requiring at least one EQ on an index, you hopefully limit the set of rows that need to be read into memory to a manageable size. Although obviously you can still get into trouble with that as well.  
+    A: Inequalities on secondary indices are always done in memory, so without at least one EQ on another secondary index you will be loading every row in the database, which with a massive database isn't a good idea. So by requiring at least one EQ on an index, you hopefully limit the set of rows that need to be read into memory to a manageable size. (Although obviously you can still get into trouble with that as well).
  
   * Q: How does choice of Consistency Level affect cluster availability when using secondary indexes?
-    A: Because secondary indexes are distributed, you must have CL level nodes available for '''all''' token ranges in the cluster in order to complete a query. For example, with RF = 3, when two out of three consecutive nodes in the ring are unavailable, '''all''' secondary index queries at CL = QUORUM will fail, however secondary index queries at CL = ONE will succeed. This is true regardless of cluster size.
+    A: Because secondary indexes are distributed, you must have CL nodes available for '''all''' token ranges in the cluster in order to complete a query. For example, with RF = 3, when two out of three consecutive nodes in the ring are unavailable, '''all''' secondary index queries at CL = QUORUM will fail, however secondary index queries at CL = ONE will succeed. This is true regardless of cluster size.