The functionality of a WHERE clause usually means maintaining an
inverted index, usually another CF, on the information of interest
(ses_tstamp in your example).  You then retrieve index rows from that
CF to find the data rows.


b

On Wed, May 12, 2010 at 5:34 AM, Moses Dinakaran
<mosesdinaka...@gmail.com> wrote:
> Hi All,
>
> In Cassandra it possible to remove records based upon where condition.
>
> We are planning to move the session and cache table from MySql to Cassandra
> and where doing the fesability study. Everything seems to be Ok other than
> garbage collection of session table.
>
> Was not able to  remove super columns from the Key based upon certain
> conditions in the column value.
>
> Follows the schema for Session tables
>
>
> FESession  = {
>     sessions : {
>     1001 : {
>     ses_name       : "user",
>     ses_userid      :  258,
>     ses_tstamp    : “1273504587”
>     },
>     1002 : {
>     ses_name    : "user",
>     ses_userid    :  259,
>     ses_tstamp    : “1273504597”
>     },
>     },
> }
>
> I wanted to remove the records based upon the value of the column ses_tstamp
> ie (delete from sessions where ses_tstamp between XXX & YYY OR delete from
> session where ses_tstamp < XXX )
>
> Is it possible to achieve this in Cassandra If so  please let me know how.
>
> To my knowledge I dont see any kind of where condition in Casandra,
> If that is the case also please let me know the other ways like
> restructuring the Schema or whatever...
>
> Regards
> Moses
>
>
>
>
>
>
>

Reply via email to