cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narendra Sharma <>
Subject Re: Newbie question
Date Tue, 10 May 2011 16:14:32 GMT
You can have only one ordering defined in a CF. Super CF will allow you to
have nested ordering i.e. SC can have one ordering whereas columns within SC
can have other ordering. Note this is defined at CF level and cannot be
defined at SC level.

To model what you are trying to do, you can check if secondary indexes will
be useful (assuming you have standard CF). If not you can create another CF
that will just keep NAME as column name and ID as column value. This will
ensure ordering by NAME and pointer to original column (or SC depending on
your schema). The downside is you will need to run 2 queries to get the


On Tue, May 10, 2011 at 6:33 AM, Sam Ganesan <>wrote:

> All:
> A newbie question to the aficianados.  I understand that I can stipulate an
> ordering mechanism when I create a column family to reflect what I am
> querying in the long run.  Generally I need to query a particular column
> space that I am contructing based on two different columns.  The frequency
> of these queries is not that different from each other.  I query based on a
> numberical ID or a name with equal frequency.
> What is the recommended way of approaching this problem
> Regards
> Sam
> *__
> Sam Ganesan Ph.D.
> Distinguished member, Technical Staff
> Motorola Mobility - On Demand Video
> 900 Chelmsford Street,
> Lowell, MA 01851
> tel:+1 978 614-3165  (changed)
> mob:+1 978 328-7132
> mailto:*

Narendra Sharma
Solution Architect

View raw message