From user-return-63817-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Sun May 5 15:26:00 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0DE8118066B for ; Sun, 5 May 2019 17:25:59 +0200 (CEST) Received: (qmail 36739 invoked by uid 500); 5 May 2019 15:25:56 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 36726 invoked by uid 99); 5 May 2019 15:25:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2019 15:25:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9DF93C0596 for ; Sun, 5 May 2019 15:25:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=jonhaddad-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8FLiRbZUxENi for ; Sun, 5 May 2019 15:25:54 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E0BCA5FD95 for ; Sun, 5 May 2019 15:25:53 +0000 (UTC) Received: by mail-wr1-f44.google.com with SMTP id q10so5308767wrj.10 for ; Sun, 05 May 2019 08:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jonhaddad-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oJCEUmByzpFwtO5kkq419MO8C5+Y3sfjKqVIlvRMPfI=; b=cxwu3XbwAmkeEUTMaoQhHIDsINJzqbxtvQ+mnR3meTq4dbfN8mFrwUaRDNvPqEem7r FXskJZGCjdgsPxocq5jjsF9S51iDUG7sHFVlYElCUKsPV0FwjnVXHYmqDfTv20De1Iio 0TJQw5BV+883mOiu+E0FhZEdeEky5vgTl3kuYF5eZWTAg4v7fo/w0MD/ki4JtbBlhs2C t5/oviwecQQtap7c8SghOwmL+IKLdHSgwPpGDEMw3mdqOO/fhbqKQFBYW/o8ieK6+1rI T6C0gCv2Qu4gEHg+YEshFpHM/KFS1+Ffd0f8EPY2KNl5qZoDjYP5vNPq5ikU+zSarqQL ysWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oJCEUmByzpFwtO5kkq419MO8C5+Y3sfjKqVIlvRMPfI=; b=rcx4y77/ByT6mc9ouBmwoe0M2JjxCupOpAOWXJTNMM2h3f2B8MP7ZEb2k7zxKd9rhp RGXnHO38OWEUSr7u6/s+uEFviL6lK1SaNCGBvalW/7+9Jfep4z1GLiGKx+cvZu8P1GVB h8DdAaVlrhUZGXPDK+Yn7SRfQVb/BuMGI8QY21chzOUfF7F9wkRKy5P88s2s3tzonWZi uSbB/biYTGcGv4cFdMurjjaER4EPwTO7Q7gmGCEuVt6uARGDwgZSu9CE0gSTk5SWwiCn EkX0w2R6Gh63XFDqp99n1N+4HdnRZb7L1A/RWdRp7L2+z5oRqg5Hdmxc8Lk494AFjRB4 XRiA== X-Gm-Message-State: APjAAAVI4rqRuGtLLwrhb7wwjEFbQyYXPX3yJUXBk2DPZA8EkJLhM4p8 yfEchucKTsBhsO4xVIHq4XhY8YYLOasxxg6w4nFZUku8UfY= X-Google-Smtp-Source: APXvYqx4LNBfxKeUAuv1jAkUHCgoaucFxfmZ2MZZrQPCqOaK+5uMgtTkk9wI715BFe5IBthLp+vL6KATnO1urAEplGE= X-Received: by 2002:a5d:50c7:: with SMTP id f7mr5777014wrt.95.1557069947013; Sun, 05 May 2019 08:25:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jon Haddad Date: Sun, 5 May 2019 08:25:36 -0700 Message-ID: Subject: Re: Priority in IN () cqlsh comand To: user@cassandra.apache.org Content-Type: text/plain; charset="UTF-8" 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 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