cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Indranath Ghosh <indrana...@gmail.com>
Subject Re: Slow Reads
Date Wed, 27 Jul 2011 16:48:25 GMT
You might want to avoid super columns and denormalize your schema...
Since you are querying by the supercoumns... you can make them the rowkeys
and current rowkeys can be your column names.. and using composite column
names to get to the columns faster.
Something like this (used your representation):

"supercol1":{

"rowkey1_col1":T

"rowkey1_col2":C

"rowkey2_col1":A

"rowkkey2_col2":A

       }

"supercol2":{

"rowkey1_col1":C

"rowkey1_col2":T
"rowkey2_col1":A
"rowkkey2_col2":A

       }


"supercol3":{

       }

"rowkey1_col1":C

"rowkey1_col2":T

"rowkey2_col1":C
"rowkkey2_col2":T

-indra

On Tue, Jul 26, 2011 at 10:47 AM, Priyanka <priya429@gmail.com> wrote:

> this is how my data looks
> “rowkey1”:{
>            “supercol1”:{ “col1”:T,”col2”:C}
>            “supercol2”:{“col1”:C,”col2”:T }
>            “supercol3”:{ “col1”:C,”col2”:T}
>                }
> "rowkey2”:{
>           “supercol1”:{ “col1”:A,”col2”:A}
>            “supercol2”:{“col1”:A,”col2”:T }
>            “supercol3”:{ “col1”:C,”col2”:T}
>             }
>
> each row has 620901 super columns and 2 columns for each super column.
> Name of the super columns remain same for all the rows but the data in each
> super column is different.
> I am trying to get the data of a particular super col which is spread
> across
> all the rows but with different data.
>
> So  yes,its getting data from all rows.
> Please suggest me a better way to do so.
> Thank you.
>
> the output of my query will be (suppose if i do for supercol1)
> rowkey1,T,C
> rowkey2,A,A
>
>
>
> --
> View this message in context:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-Reads-tp6622680p6623091.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at
> Nabble.com.
>



-- 
*Indranath Ghosh
Phone: 408-813-9207*

Mime
View raw message