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.i...@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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org

Reply via email to