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 BAB2A200CC2 for ; Wed, 5 Jul 2017 14:18:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B91C7163193; Wed, 5 Jul 2017 12:18:00 +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 0BE73163192 for ; Wed, 5 Jul 2017 14:17:59 +0200 (CEST) Received: (qmail 65871 invoked by uid 500); 5 Jul 2017 12:17:59 -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 65858 invoked by uid 99); 5 Jul 2017 12:17:59 -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; Wed, 05 Jul 2017 12:17:59 +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 AEE75C0F34 for ; Wed, 5 Jul 2017 12:17:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.424 X-Spam-Level: ** X-Spam-Status: No, score=2.424 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_ENVFROM_END_DIGIT=0.25, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BrgVe2kdwpZ7 for ; Wed, 5 Jul 2017 12:17:55 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 397865FACE for ; Wed, 5 Jul 2017 12:17:55 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mwork.nabble.com (Postfix) with ESMTP id 8215250186BED for ; Wed, 5 Jul 2017 05:17:54 -0700 (MST) Date: Wed, 5 Jul 2017 05:17:54 -0700 (MST) From: neerajbhatt To: user@ignite.apache.org Message-ID: <1499257074525-14320.post@n6.nabble.com> Subject: Group index taking too much time MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Wed, 05 Jul 2017 12:18:00 -0000 Hi All We have pushed around 1.4 million item objects (with group index) and with following query takes around 80 ms (on server), which is way ahead for our use case. Please suggest String rating="0"; String review="0"; String download="0"; StringBuilder buff = new StringBuilder("SELECT T._VAL FROM " + "ITEMCACHE.Item as T " + " WHERE " + " T.rating=? AND T.reviews=? AND T.downloads=? " + " limit 10"); SqlFieldsQuery qry = new SqlFieldsQuery(buff.toString()); List> res = cache.query(qry.setArgs(new Object[]{rating,review,download})).getAll(); ///Item object is public class Item2 implements Serializable { private static final long serialVersionUID = 1L; @QuerySqlField(index = true, orderedGroups = { @QuerySqlField.Group(name = "idx1", order = 2) }) private int downloads; @QuerySqlField(index = true, orderedGroups = { @QuerySqlField.Group(name = "idx1", order = 0) }) private double rating; @QuerySqlField(index = true, orderedGroups = { @QuerySqlField.Group(name = "idx1", order = 1) }) private int reviews; @QuerySqlField(index = true) @AffinityKeyMapped private String id; public int getDownloads() { return downloads; } public void setDownloads(int downloads) { this.downloads = downloads; } public double getRating() { return rating; } public void setRating(double rating) { this.rating = rating; } public int getReviews() { return reviews; } public void setReviews(int reviews) { this.reviews = reviews; } public String getId() { return id; } public void setId(String id) { this.id = id; } public static long getSerialversionuid() { return serialVersionUID; } -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Group-index-taking-too-much-time-tp14320.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.