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 94D09186B8 for ; Fri, 8 May 2015 23:47:11 +0000 (UTC) Received: (qmail 38895 invoked by uid 500); 8 May 2015 23:47:11 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 38874 invoked by uid 500); 8 May 2015 23:47:11 -0000 Mailing-List: contact user-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.incubator.apache.org Delivered-To: mailing list user@ignite.incubator.apache.org Received: (qmail 38863 invoked by uid 99); 8 May 2015 23:47:11 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 23:47:11 +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 F00121A254F for ; Fri, 8 May 2015 23:47:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Lg8MkZhTc_3E for ; Fri, 8 May 2015 23:46:57 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 6663E24965 for ; Fri, 8 May 2015 23:46:56 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mwork.nabble.com (Postfix) with ESMTP id 659171DACDF0 for ; Fri, 8 May 2015 16:47:13 -0700 (PDT) Date: Fri, 8 May 2015 16:43:59 -0700 (PDT) From: pgarg To: user@ignite.incubator.apache.org Message-ID: <1431128639239-79.post@n6.nabble.com> Subject: How to improve query performance? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit /asked by john smith/ Hi running RC3 I have the following cache config.... ... ... My model look like so... public class MyModel { @QuerySqlField(index = true) Long id; @QuerySqlField(index = true) Integer someField1; @QuerySqlField(index = true) Integer someField2; @QuerySqlField(index = true) String someField3; @QuerySqlField(index = true) String someField14; @QuerySqlField(index = true) String someField5; @QuerySqlField(index = true) String someField6; @QuerySqlField(index = true) String someField7; @QuerySqlField(index = true) String someField8; @QuerySqlField(index = true) Long someField9; @QuerySqlField(index = true) String someField10; @QuerySqlField(index = true) String someField11; .. Setters and Getters here... } And in my application I run... // Do this once at startup... Ignite ignite = Ignition.start("cache.xml"); myCache= ignite.jcache("risk"); // Per http POST request in my servlet myCache.put(request.getId(), request); String sqlStr = "someField1 = ? OR " + "someField2 = ? OR " + "someField3 = ? OR " + "someField4 = ? OR " + "someField5= ? OR " + "someField6 = ? OR " + "someField7 = ? OR " + "someField8 = ? OR " + "someField9 = ?"; SqlQuery sql = new SqlQuery(MyModel.class, sqlStr); QueryCursor> cursor = myCache.query(sql.setArgs(...)); for (Entry t : cursor) size++; Even on a single node with verry few entries a couple thousand I am only able to execute about 200 queries per second at average 400ms. Is there anything I can do to improve the performance? The query at most will only ever return 1-2 records even if the data grid could reach millions of records. ----- /This post is migrated from now discontinued Apache Ignite forum at http://apacheignite.readme.io/v1.0/discuss/ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-improve-query-performance-tp79.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.