Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B8968200CC9 for ; Mon, 17 Jul 2017 12:24:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B6FB9164B77; Mon, 17 Jul 2017 10:24:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D594A164B76 for ; Mon, 17 Jul 2017 12:24:34 +0200 (CEST) Received: (qmail 34860 invoked by uid 500); 17 Jul 2017 10:24:34 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 34849 invoked by uid 99); 17 Jul 2017 10:24:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2017 10:24:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7DC11180643 for ; Mon, 17 Jul 2017 10:24:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id QMACtK43RjYx for ; Mon, 17 Jul 2017 10:24:31 +0000 (UTC) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com [209.85.217.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 9A5AB5F6C8 for ; Mon, 17 Jul 2017 10:24:30 +0000 (UTC) Received: by mail-ua0-f170.google.com with SMTP id 64so11422331uae.2 for ; Mon, 17 Jul 2017 03:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=z8oucohSMdTu4d7yancn4wuVcgXgYBY7EUVvZ0H0J7g=; b=b9gq/35gszVtGlIpZIMGQ1owuY/UlQEaeys7ObY7TTTA4t9JExidgVBEx688+/8GkR 70qC9/C1XQ2Qr0u5rX54ipM6bRqS+yTXpVoAsp2xtUM75Mz2g1+e4lIfryBV7W6jLzYx W28bR7CYqU8b+t8rR1x6gI9AESHyjsYgzRMP4tgi1GbVIe6XXy4J2FshCjHEkU/ovT3R iNwz44dhL6HCQx3AoohqNhgf5RSObu84aElCpAAGeEctNJy95f1x+BJqAbqsOQc5EmMH dqXXxW3QG3pgTbO0nO7JPK9gMV39dRIfdNi8P3DJK4cZEh+2tkCN6ozGGd5bjjkZypN0 bvpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=z8oucohSMdTu4d7yancn4wuVcgXgYBY7EUVvZ0H0J7g=; b=pyjf050f9JnMUdPX702JhL7fHO0eM11Fab+M8aeetS63kPB0yZTzdc5UGtwmEEPkw2 mIg2K37wfSrmohafK9+Dbbp5/ujLsstNY35b3vrmXvMtt4R0CMm/3ccGNg3OdiLFoDBj lAwzgnjoS30vzzHQiEORQn50KhkZRgYszzBQM4dRzMJb/3gXaL4TvKCkJxXY5pBjeMPQ R21kdIVbocrjJyf58X9se5/osLty4ZoHNws5RmRQTYKyOxpLJE9txbAUoFoPeTF1b7yj AIO/1ARLjKzwstPJlugIXcX1nHUQhysjOLPsnvBYxfo6nDWp/DqtOfV1+IX47Pc2zC4Z Z2YA== X-Gm-Message-State: AIVw111mxLdUz4okH+NFKf7YtihWI0Oz01sDfTSviujZH9gkYQNmC6iM HrOsNd9dOQqk232ip9NpFDrbxmYjzzWg X-Received: by 10.31.87.132 with SMTP id l126mr10053187vkb.81.1500287062765; Mon, 17 Jul 2017 03:24:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.40.161 with HTTP; Mon, 17 Jul 2017 03:24:22 -0700 (PDT) In-Reply-To: <1500284655431-14994.post@n6.nabble.com> References: <1500019486311-14884.post@n6.nabble.com> <1500026328849-14891.post@n6.nabble.com> <1500030616118-14903.post@n6.nabble.com> <1500036756129-14906.post@n6.nabble.com> <1500284655431-14994.post@n6.nabble.com> From: Andrey Mashenkov Date: Mon, 17 Jul 2017 13:24:22 +0300 Message-ID: Subject: Re: sql query in case of cluster group To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="001a114e59f46ff426055480cd9f" archived-at: Mon, 17 Jul 2017 10:24:35 -0000 --001a114e59f46ff426055480cd9f Content-Type: text/plain; charset="UTF-8" 1. LIMIT make no sense without ORDER for non-local queries and when sqlQueryParallelizm > 1. As in that case, data from different index segments will be merged out of order and you can get different results with same query from run to run . 2. You use ClusterGroup to make your jobs to be run on certain nodes, but it doesn't affect operations inside a job. So, non-local sql query will be run on all data nodes. On Mon, Jul 17, 2017 at 12:44 PM, neerajbhatt wrote: > Hi Andrew > > It seems to be an order by issue. We have created a test project in github > https://github.com/neerajbhatt/testIgnite > > If we use PutItems to put some records in a partitioned cache(TESTCACHE) > args[0]=number of records, and then Get the items by > GetItemsWithClusterGroup args[0] = query type (0 or 1), args[1]= number of > queries and args [3] as last digit of ip. > > for first query ("SELECT T.id FROM " + "TESTCache.TestItem as T LIMIT 3") > different ids are given for different cluster groups( each cluster group > having one node) > > for second query ("SELECT T.id FROM " + "TESTCache.TestItem as T order by > field1 desc LIMIT 3") we are getting same ids for each cluster group. It > seems in case of order by instead of cluster group data is being fetched > from whole cluster. > > Please suggest > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/sql-query-in-case-of-cluster-group-tp14884p14994.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Best regards, Andrey V. Mashenkov --001a114e59f46ff426055480cd9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
1. LIMIT make no sense without ORDER for non-local queries= and when sqlQueryParallelizm > 1.=C2=A0
As in that case, data from = different index segments will be merged out of order and you can get differ= ent results with same query from run to run=C2=A0.

2. Yo= u use ClusterGroup to make your jobs to be run on certain nodes, but it doe= sn't affect operations inside a job.
So, non-local sql query = will be run on all data nodes.
=
On Mon, Jul 17, 2017 at 12:44 PM, neerajbhat= t <neerajbhatt2000@gmail.com> wrote:
Hi Andrew

It seems to be an order by issue. We have created a test project in github<= br> https://github.com/neerajbhatt/testIgnite

If we use PutItems to put some records in a partitioned cache(TESTCACHE) args[0]=3Dnumber of records, and then Get the items by
GetItemsWithClusterGroup args[0] =3D query type (0 or 1), args[1]=3D number= of
queries and args [3] as last digit of ip.

for first query ("SELECT T.id FROM " + "TESTCache.TestItem a= s T LIMIT 3")
different ids are given for different cluster groups( each cluster group having one node)

for second query ("SELECT T.id FROM " + "TESTCache.TestItem = as T order by
field1 desc LIMIT 3") we are getting same ids for each cluster group. = It
seems in case of order by instead of cluster group data is being fetched from whole cluster.

Please suggest



--
View this message in context: http://apache-ignite-users.70518.x6.nabb= le.com/sql-query-in-case-of-cluster-group-tp14884p14994.html<= br> Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Best regards,
Andrey V. Mashenkov
--001a114e59f46ff426055480cd9f--