Hi, I see that you are referencing "Item" not "Item2" in your SQL query. Does "Item" have the same index configured? Also, please describe your network topology, how many server and client nodes are you running?
I built a reproducer based on your code, executed your query 5000 times, and each query takes an average of 140 microseconds : Executing query... Query executed. Execution time for 5000 queries = 700191368ns. Avg Per Query: 140 microseconds Kind regards Mike -----Original Message----- From: neerajbhatt [mailto:[email protected]] Sent: 05 July 2017 14:18 To: [email protected] Subject: Group index taking too much time 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<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-t ime-tp14320.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
