cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Kolb <>
Subject Re: Bitmask operators exist?
Date Fri, 19 Aug 2011 18:34:59 GMT
Have you considered creating a composite key for the various permutations of values that you
need to query? For example "good.ok" could contain a column for each entity with the value
specifying whether the entity is "good" or "ok". You could the. Have another composite key
for "good.bad", "bad.ok" etc. 

I've found that in order to reduce reads with Cassandra you often need to write the same data
more than once in multiple places to suit your queries. I actually started implementing a
bitmap operator at one point but it turned out to require more reads on the backend than it
was worth. Cassandra already provides the bloom filter for probabilistic reads based on row
keys, I think you want to try to leverage that as much as possible. 


On Aug 19, 2011, at 10:43 AM, Benjamin Padgett <> wrote:

> What would you suggest for handling such a situation?  I come from RDMS world...
> Is it typical for a Cassandra implementation to make multiple slices to get the desired
> Thanks for the quick response!
> ____________________________________________
> Benjamin Padgett
> -----Original Message-----
> From: Jonathan Ellis [] 
> Sent: Friday, August 19, 2011 10:38 AM
> To:
> Subject: Re: Bitmask operators exist?
> On Fri, Aug 19, 2011 at 10:08 AM, Benjamin Padgett <>
>> Have a column family with a few secondary indexes and I am trying to find records
where multiple flags are set using a bitmask.  I do not see documentation on bitmask operators
so I am unsure if they exist.
> They do not, sorry.
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support

View raw message