You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jimmy Lin <y2...@gmail.com> on 2014/01/30 05:41:40 UTC

cql IN clause question

select * from mytable where mykey IN('xxx', 'yyy', 'zzz','111',222','333')

is there a limit on how many item you can specify inside IN clause?

CQL IN clause will help reduce the round trip traffic otherwise needed if
use multiple select statement, correct?
but how about the co-ordinate node that receive this request? is that
possible we are putting lot of pressure on a single node when the IN clause
has many items(100s)?
or Cassandra has special handling of IN clause that is efficient handling
the load?

thanks

Re: cql IN clause question

Posted by Edward Capriolo <ed...@gmail.com>.
Each IN is the equivalent of a thrift get_slice(). You are saving some
overhead on round trips but if you have a schema design that calls for
large in clauses your may not be designing your schema correctly.


On Wed, Jan 29, 2014 at 11:41 PM, Jimmy Lin <y2...@gmail.com> wrote:

> select * from mytable where mykey IN('xxx', 'yyy', 'zzz','111',222','333')
>
> is there a limit on how many item you can specify inside IN clause?
>
> CQL IN clause will help reduce the round trip traffic otherwise needed if
> use multiple select statement, correct?
> but how about the co-ordinate node that receive this request? is that
> possible we are putting lot of pressure on a single node when the IN clause
> has many items(100s)?
> or Cassandra has special handling of IN clause that is efficient handling
> the load?
>
> thanks
>
>
>
>