incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Shon <philip.s...@gmail.com>
Subject Trying to avoid super columns
Date Thu, 12 Apr 2012 19:03:08 GMT
I am currently working on a data model where the purpose is to look up
multiple products for given days of the year.  Right now, that model
involves the usage of a super column family. e.g.

"2012-04-12": {
  "product_id_1": {
    price: 12.44,
    tax: 1.00,
    fees: 3.00,
  },
  "product_id_2": {
    price: 50.00,
    tax: 4.00,
    fees: 10.00
  }
}

I should note that for a given day/key, we are expecting in the range of 2
million to 4 million products (subcolumns).

With this model, I am able to retrieve any of the products for a given day
using hector's MultigetSuperSliceQuery.


I am looking into changing this model to use Composite column names. How
would I go about modeling this? My initial thought is to migrate the above
model into something more like the following.

"2012-04-12": {
  "product_id_1:price": 12.44,
  "product_id_1:tax": 1.00,
  "product_id_1:fees": 3.00,

  "product_id_2:price": 50.00,
  "product_id_2:tax": 4.00,
  "product_id_2:fees": 10.00,
}

The one thing that stands out to me with this approach is the number of
additonal columns that will be created for a single key. Will the increase
in columns, create new issues I will need to deal with?

Are there any other thoughts about if I should actually move forward (or
not) with migration this super column family to the model with the
component column names?

Thanks,

Phil

Mime
View raw message