title: How do you make querying and extracting largest values from Cassandra fast?
body: <p>If I want to be able to query a table in Cassandra quickly and extract the largest values from it, how should one design the column family for it?</p>
  
  <p>For example, if I have a table with peoples ID as and I also store for each person their speed, how I design the table such that I can query the slowest people as fast as I can?</p>
  
  <p>Do we need to make speed a primary key? Or create an index on it or something?</p>
  
  <p>How do I know when to choose secondary index over primary keys, in this example?</p>
  
  <p>Is it possible to extract, say top k people that are the slowest by just making the speed a secondary index? </p>
  
  <p>I guess my question also tries to address how things are sorted in Casssandra.</p>