Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F0DD193C2 for ; Wed, 13 Apr 2016 14:48:47 +0000 (UTC) Received: (qmail 16544 invoked by uid 500); 13 Apr 2016 14:48:46 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 16501 invoked by uid 500); 13 Apr 2016 14:48:46 -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 16491 invoked by uid 99); 13 Apr 2016 14:48:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2016 14:48:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id F06421A0CFD for ; Wed, 13 Apr 2016 14:48:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Sv26DhLCLYu5 for ; Wed, 13 Apr 2016 14:48:44 +0000 (UTC) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.161.173]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 38E325F239 for ; Wed, 13 Apr 2016 14:48:44 +0000 (UTC) Received: by mail-yw0-f173.google.com with SMTP id o66so71595031ywc.3 for ; Wed, 13 Apr 2016 07:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=vxtGkVQIm+Pk9aR+R82OqLo18RunnGKSF4O0AgHwx50=; b=ezxazAZM6yPbdvXFrnoIoH32hxZ3YoggUqOPsXaGGY+UsUqbZTEX7czGRRcziBTdPV A16VQZqjcWx9yCev3qpF9lcccDU+SGo9/n4ZW3pdLRbJ150LoPWPKVfMVtIgSvTkkplC 6e4TkluKeJeQNxsYU2rq6SIy6vubPH2HbYrTrTVP21MHcocYfZnE68BmapokzqwbYA2b xWGRZ3eFw1IcTjpH2qERk4YTjbOW0pY0DLWwBRpHgkJOn8Er6Rlkpj9AdBi5Gf9E21hS 7Pn5uv/KL7qjTaDvTzPlMBG4DOLVxu49JRnfl4sgeCUkWnXtYdgdYRmpfur7Mon2WH7U 4Ysg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=vxtGkVQIm+Pk9aR+R82OqLo18RunnGKSF4O0AgHwx50=; b=JmDAYkWpdzrliYLeDYpCEsB1QwnaSeg0o8Nyo5H5Upq7HRWTUPH5T2/cmw5XOk271s o2bepj1F04dhh3N0JhYGkU47wXfbDRXh6wt/6Onm3u47CUko7MphZ7mvrgEck7m2sg7F vi2fV0yA/rT6/qGhTfjyd6acnI9PHOfxfH+HA7I2iT65HXqORJoV9MVB8CI/XPGoZv1M RAg1a3K9bAGbYNfBduza46HDEWOoZwDQ44tXRN7GUxm4JhVEU3qNSZC9icCoq0dPc+Ob cXumYNwPLE9upD0zi+KRBJLwG44+wLfWME2D8JSvmuI+/Rdd010UyAQKt+1rkXiyOojR sWjQ== X-Gm-Message-State: AOPr4FVUFs/lziBjxHlZQtvaUBU38zZkHaE80atDjawZzGjNSvNfxW8PRrMdWcoHFCop9RnKGcGolELVFrLVoc4p MIME-Version: 1.0 X-Received: by 10.13.246.6 with SMTP id g6mr5113608ywf.202.1460558923477; Wed, 13 Apr 2016 07:48:43 -0700 (PDT) Received: by 10.13.255.131 with HTTP; Wed, 13 Apr 2016 07:48:43 -0700 (PDT) In-Reply-To: References: <1459185767838-3718.post@n6.nabble.com> <1459252611591-3740.post@n6.nabble.com> <1459332364043-3771.post@n6.nabble.com> <1459342771493-3779.post@n6.nabble.com> <1459779824263-3902.post@n6.nabble.com> <1459834181100-3920.post@n6.nabble.com> <1460384264690-4064.post@n6.nabble.com> Date: Wed, 13 Apr 2016 17:48:43 +0300 Message-ID: Subject: Re: Host Arrays in C++ API From: Igor Sapego To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c032dcccef35805305edfaa --94eb2c032dcccef35805305edfaa Content-Type: text/plain; charset=UTF-8 Sergi, Can you please take a look? Here is the query: SELECT sid_per_id, sid_mah_id, sid_itm_id, sid_prm_id, sid_cha_code, sid_service, sid_itm_dist FROM SHOP_ITEM_BITMAP_CACHE.ShopItemBitmap as bitmap JOIN PROD_HIER_CACHE.ProdHier as prod ON prod.GHD_LEV_6 = bitmap.SID_ITM_ID AND prod.GHD_HIE_ID = 0 AND prod.ghd_lev_2_desc = 'WINE' JOIN MRKT_POD_ACV_CACHE.MarketPodAcv as mkt ON mkt.CHLD_MRKT_KEY = bitmap.SID_MAH_ID and mkt.MRKT_KEY = 4378038 AND mkt.prd_id = 712 WHERE bitmap.SID_PER_ID = 712; Here is the explain output: [[SELECT DISTINCT SID_PER_ID AS __C0, SID_MAH_ID AS __C1, SID_ITM_ID AS __C2, SID_PRM_ID AS __C3, SID_CHA_CODE AS __C4, SID_SERVICE AS __C5, SID_ITM_DIST AS __C6 FROM PROD_HIER_CACHE.PRODHIER PROD /* PROD_HIER_CACHE."ghd_hie_id_asc_ghd_lev_2_desc_asc_idx": GHD_HIE_ID = 0 AND GHD_LEV_2_DESC = 'WINE' */ /* WHERE (PROD.GHD_HIE_ID = 0) AND (PROD.GHD_LEV_2_DESC = 'WINE') */ INNER JOIN SHOP_ITEM_BITMAP_CACHE.SHOPITEMBITMAP /* SHOP_ITEM_BITMAP_CACHE."sid_itm_id_asc_idx": SID_ITM_ID = PROD.GHD_LEV_6 */ ON 1=1 /* WHERE (SHOPITEMBITMAP.SID_PER_ID = 712) AND (PROD.GHD_LEV_6 = SHOPITEMBITMAP.SID_ITM_ID) */ INNER JOIN MARKET_POD_ACV_CACHE.MARKETPODACV MKT /* MARKET_POD_ACV_CACHE."mrkt_key_asc_prd_id_asc_chld_mrkt_key_asc_idx": PRD_ID = 712 AND MRKT_KEY = 4378038 AND CHLD_MRKT_KEY = SHOPITEMBITMAP.SID_MAH_ID */ ON 1=1 WHERE (SHOPITEMBITMAP.SID_PER_ID = 712) AND (((MKT.PRD_ID = 712) AND ((MKT.MRKT_KEY = 4378038) AND (MKT.CHLD_MRKT_KEY = SHOPITEMBITMAP.SID_MAH_ID))) AND ((PROD.GHD_LEV_6 = SHOPITEMBITMAP.SID_ITM_ID) AND ((PROD.GHD_HIE_ID = 0) AND (PROD.GHD_LEV_2_DESC = 'WINE'))))], [SELECT DISTINCT __C0 AS SID_PER_ID, __C1 AS SID_MAH_ID, __C2 AS SID_ITM_ID, __C3 AS SID_PRM_ID, __C4 AS SID_CHA_CODE, __C5 AS SID_SERVICE, __C6 AS SID_ITM_DIST FROM PUBLIC.__T0 /* SHOP_ITEM_BITMAP_CACHE."merge_scan" */]] The first thing I could see is that there is no index for "sid_per_id" and the second thing is that "merge_scan" is being used. What is your thoughts? Best Regards, Igor On Tue, Apr 12, 2016 at 2:11 PM, Igor Sapego wrote: > Arthi, > > How much time does it take? What is the speed of fetching in rows > per second? > > Guys, can someone who is more familiar with Ignite's SQL queries > take a look? > > Best Regards, > Igor > > On Mon, Apr 11, 2016 at 5:17 PM, arthi > wrote: > >> Hi Igor, >> >> the SQL query for getNext() takes a whole lot of time when the results >> returned is more than 900,000 both using Java and C++ API. I have tried a >> number of configurations with indexes, but just dont get to speed these >> up. >> >> thanks, >> Arthi >> >> >> >> -- >> View this message in context: >> http://apache-ignite-users.70518.x6.nabble.com/Host-Arrays-in-C-API-tp3707p4064.html >> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >> > > --94eb2c032dcccef35805305edfaa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sergi,

Can you please take a look?

Here is the query:
SELECT sid_per_id, s= id_mah_id, sid_itm_id, sid_prm_id, sid_cha_code, sid_service, sid_itm_dist= =C2=A0
FROM SHOP_ITEM_BITMAP_CACHE.ShopItemBitmap as bitmap=C2=A0=
=C2=A0 =C2=A0 JOIN PROD_HIER_CACHE.ProdHier as prod ON prod.GHD_= LEV_6 =3D bitmap.SID_ITM_ID AND prod.GHD_HIE_ID =3D 0 AND prod.ghd_lev_2_de= sc =3D 'WINE'=C2=A0
=C2=A0 =C2=A0 JOIN MRKT_POD_ACV_CACHE= .MarketPodAcv as mkt ON mkt.CHLD_MRKT_KEY =3D bitmap.SID_MAH_ID and mkt.MRK= T_KEY =3D 4378038 AND mkt.prd_id =3D 712=C2=A0
WHERE bitmap.SID_P= ER_ID =3D 712;

Here is the explain output:
[[SELECT DISTINCT
=C2=A0 =C2=A0 SID_PER_ID AS __C0,=
=C2=A0 =C2=A0 SID_MAH_ID AS __C1,
=C2=A0 =C2=A0 SID_IT= M_ID AS __C2,
=C2=A0 =C2=A0 SID_PRM_ID AS __C3,
=C2=A0 = =C2=A0 SID_CHA_CODE AS __C4,
=C2=A0 =C2=A0 SID_SERVICE AS __C5,
=C2=A0 =C2=A0 SID_ITM_DIST AS __C6
FROM PROD_HIER_CACHE.= PRODHIER PROD
=C2=A0 =C2=A0 /* PROD_HIER_CACHE."ghd_hie_id_a= sc_ghd_lev_2_desc_asc_idx": GHD_HIE_ID =3D 0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 AND GHD_LEV_2_DESC =3D 'WINE'
=C2=A0 =C2=A0= =C2=A0*/
=C2=A0 =C2=A0 /* WHERE (PROD.GHD_HIE_ID =3D 0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 AND (PROD.GHD_LEV_2_DESC =3D 'WINE')<= /div>
=C2=A0 =C2=A0 */
INNER JOIN SHOP_ITEM_BITMAP_CACHE.SHOP= ITEMBITMAP
=C2=A0 =C2=A0 /* SHOP_ITEM_BITMAP_CACHE."sid_itm_= id_asc_idx": SID_ITM_ID =3D PROD.GHD_LEV_6 */
=C2=A0 =C2=A0 = ON 1=3D1
=C2=A0 =C2=A0 /* WHERE (SHOPITEMBITMAP.SID_PER_ID =3D 71= 2)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 AND (PROD.GHD_LEV_6 =3D SHOPITEMBI= TMAP.SID_ITM_ID)
=C2=A0 =C2=A0 */
INNER JOIN MARKET_POD= _ACV_CACHE.MARKETPODACV MKT
=C2=A0 =C2=A0 /* MARKET_POD_ACV_CACHE= ."mrkt_key_asc_prd_id_asc_chld_mrkt_key_asc_idx": PRD_ID =3D 712<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 AND MRKT_KEY =3D 4378038
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 AND CHLD_MRKT_KEY =3D SHOPITEMBITMAP.SID_MAH_ID=
=C2=A0 =C2=A0 =C2=A0*/
=C2=A0 =C2=A0 ON 1=3D1
WHERE (SHOPITEMBITMAP.SID_PER_ID =3D 712)
=C2=A0 =C2=A0 AND (((= MKT.PRD_ID =3D 712)
=C2=A0 =C2=A0 AND ((MKT.MRKT_KEY =3D 4378038)=
=C2=A0 =C2=A0 AND (MKT.CHLD_MRKT_KEY =3D SHOPITEMBITMAP.SID_MAH_= ID)))
=C2=A0 =C2=A0 AND ((PROD.GHD_LEV_6 =3D SHOPITEMBITMAP.SID_I= TM_ID)
=C2=A0 =C2=A0 AND ((PROD.GHD_HIE_ID =3D 0)
=C2= =A0 =C2=A0 AND (PROD.GHD_LEV_2_DESC =3D 'WINE'))))], [SELECT DISTIN= CT
=C2=A0 =C2=A0 __C0 AS SID_PER_ID,
=C2=A0 =C2=A0 __C1= AS SID_MAH_ID,
=C2=A0 =C2=A0 __C2 AS SID_ITM_ID,
=C2= =A0 =C2=A0 __C3 AS SID_PRM_ID,
=C2=A0 =C2=A0 __C4 AS SID_CHA_CODE= ,
=C2=A0 =C2=A0 __C5 AS SID_SERVICE,
=C2=A0 =C2=A0 __C6= AS SID_ITM_DIST
FROM PUBLIC.__T0
=C2=A0 =C2=A0 /* SHOP= _ITEM_BITMAP_CACHE."merge_scan" */]]

The first thing I could see is that there is no index for "sid_per_= id" and the second thing is that "merge_scan" is being used.=
What is your thoughts?


Best Regards,
Igor

On Tue, Apr 12, 2016 at 2:11 PM, Igor Sapego= <isapego@gridgain.com> wrote:
Arthi,

How much time does it ta= ke? What is the speed of fetching in rows
per second?
<= br>
Guys, can someone who is more familiar with Ignite's SQL = queries
take a look?

Best Regards,
Igor

On Mon, Apr 11, 2016 at 5:17 PM, arthi <Arthi.Kasturirangan.ap@nielsen.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Hi Igor,

the SQL query for getNext() takes a whole lot of time when the results
returned is more than 900,000 both using Java and C++ API. I have tried a number of configurations with indexes, but just dont get to speed these up.=

thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Host-Arrays-in= -C-API-tp3707p4064.html
Sent from the Apache Ignite Users mailing list archive at Nabble.= com.


--94eb2c032dcccef35805305edfaa--