Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6063633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:11:23+00:00 2026-05-23T09:11:23+00:00

How does a Cassandra Secondary-Index work internally? The docs state it is some kind

  • 0

How does a Cassandra Secondary-Index work internally? The docs state it is some kind of Hash Index:

Given i have the colum username="foobar" (Column username will be scondary index) in a CF User with RandomOrderingPartitioner

  1. Is my asumption correct, that cassandra uses a “Distributed Hash Index” (=so the index is not on one single node=the index is splitted)?
  2. On how many nodes are the index-parts held (the same amout as the replicatio factor)?
  3. On which nodes are the index-parts held (does Cassandra split the index by the same logic as the key with RandomOrderingPartitioner)?

  4. In case the index is hold on only one node (and of course replicated), how does cassandra “determin” the node that is responsible for the
    index (By hashing the columname and then using the randompartitioner logik to determine the node)?

  5. Is it really true, that this index is optimized for low cardinality? If yes, what is a rough estimate (
    is there a concrete figure that i can use to judge), that I should not use a secondary index (and rather use
    a seperate CF for the index)?
    Or said differently how to calculate the cardinality and make the right decision?

I am trying to understand this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:11:23+00:00Added an answer on May 23, 2026 at 9:11 am

    Secondary indexes are basically just another column family. They are not directly accessible to users, but you can see statistics via the JMX bean:
    org.apache.cassandra.db.IndexedColumnFamilies

    You can consult the statistics here to gauge the effectiveness of your index as you would a normal column family.

    For more details see these previous posts:

    How are Cassandra's 0.7 Secondary Indexes stored?

    How scalable are automatic secondary indexes in Cassandra 0.7?

    And since you have a hector tag, here is a link to the test case for IndexedSlicesQuery:
    https://github.com/rantav/hector/blob/master/core/src/test/java/me/prettyprint/cassandra/model/IndexedSlicesQueryTest.java

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How does Facebook structure their data for messages. I have heard they use Cassandra
Does anyone have advice on using cassandra with scala? There is no native scala-cassandra
I am researching the possibility of using secondary index feature in Cassandra using Aquiles.
I have the cassandra cluster of 12 nodes on EC2. Because of some failure
Does anyone have any good information aside from the Google App Engine docs provided
Does Google force employees who have offers from Facebook to leave immediately?
Does the Java language have delegate features, similar to how C# has support for
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone have any recommendations of tools that can be of assistance with moving
Does anyone use have a good regex library that they like to use? Most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.