cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Haddad <...@jonhaddad.com>
Subject Re: Priority in IN () cqlsh comand
Date Sun, 05 May 2019 15:25:36 GMT
Do separate queries for each partition you want.  There's no benefit
in using the IN() clause here, and performance is significantly worse
with multi-partition IN(), especially if the partitions are small.

On Sun, May 5, 2019 at 4:52 AM Soheil Pourbafrani <soheil.ir08@gmail.com> wrote:
>
> Hi,
>
> I want to run cqlsh query on cassandra table using IN
>
> SELECT * from data WHERE nid = 'value' AND yyyymm IN (201905,201904) AND tid = 'value2'
AND ts >= 1556394660000 AND ts <= 1556999460000 ;
>
> The nid and yyyymm columns are partition key and the ts is clustering key.
> The problem is cassandra didn't care about the order of the IN List and always return
201904 partition data first and after that it return 201905 partition data, but I wanted to
201905 partition data to come first.
>
> Is there any solution for this?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Mime
View raw message