Hi, I think your query should be rewritten for correct index usage. Ignite has some known pitfalls concerning index usage [1]. Also, join order is sensitive to index configuration. FIrst specify joins using indexes.
Could you provide your business model pojos and current indexes configuration? [1] https://apacheignite.readme.io/docs/sql-queries#performance-and-usability-considerations 2016-05-09 14:23 GMT+03:00 jan.swaelens <jan.swael...@sofico.be>: > I tried to defined the grouped indexes but I see no result on the explain > plan nor on the actual run. This must mean that either I am doing something > wrong or that something is going wrong. > > First attempt I annotated the fields on the objects, for example an extract > of the Activity pojo: > > / /** Value for activityId. */ > @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = > "Activity_idx", order = 0, descending = true)}) > private long activityId; > > /** Value for realizationId. */ > @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = > "Activity_idx", order = 1, descending = true)}) > private Long realizationId; > > /** Value for kernelId. */ > @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = > "Activity_idx", order = 2, descending = true)}) > private Long kernelId; > > /** Value for removefromworklist. */ > @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = > "Activity_idx", order = 3, descending = true)}) > private boolean removefromworklist; > > /** Value for lastactivityId. */ > @QuerySqlField(orderedGroups={@QuerySqlField.Group(name = > "Activity_idx", order = 4, descending = true)}) > private Long lastactivityId;/ > > Since that did not work I also had an attempt to define it on the cache > configuration (query entity): > > / QueryIndex gIdx = new QueryIndex(); > idxs.add(gIdx); > gIdx.setName("Activity_idx"); > > Collection<String> gFields = new ArrayList<>(); > gFields.add("activityId"); > gFields.add("realizationId"); > gFields.add("kernelId"); > gFields.add("removefromworklist"); > gFields.add("lastactivityId"); > gIdx.setFieldNames(gFields, true);/ > > > Could it be that the field aliases I use are causing this? Or something > else > I am missing? > > tx > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/Unexpected-performance-issue-with-SQL-query-followed-by-error-tp4726p4846.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Best regards, Alexei Scherbakov