[Resolved]Re: Issues with sub query IN clause

2018-02-03 Thread Rajesh Kishore
You rock Andrey, the trick worked , tried the same in api, including your response for everyone Orginal query - SELECT st.entryID,st.attrName,st.attrValue, st.attrsType FROM (SELECT entryID as entryID FROM "objectclass".IGNITE_OBJECTCLASS

Re: Issues with sub query IN clause

2018-02-03 Thread Rajesh Kishore
Hi Andrey, everyone, I am trying to figure out the way that my query should use index instead of full scan, trying to run following query SELECT st.entryID,st.attrName,st.attrValue, st.attrsType FROM (SELECT entryID as entryID FROM "objectclass".IGNITE_OBJECTCLASS WHERE attrValue = 'person'

Re: Issues with sub query IN clause

2018-02-02 Thread Rajesh Kishore
My bad still I am using the IN clause with variable parameter. I am exploring other queries. Thanks a ton Rajesh On 2 Feb 2018 10:41 p.m., "Rajesh Kishore" wrote: > Hi Andrey, > > This query remains stuck > "EXPLAIN SELECT store.entryID,store.attrName,store.attrValue,

Re: Issues with sub query IN clause

2018-02-01 Thread Rajesh Kishore
Thanks Dmitriy, The EXPLAIN PLAN [[SELECT STORE__Z1.ENTRYID AS __C0_0, STORE__Z1.ATTRNAME AS __C0_1, STORE__Z1.ATTRVALUE AS __C0_2, STORE__Z1.ATTRSTYPE AS __C0_3 FROM "dn".IGNITE_DN DN__Z0 /* "dn".IGNITE_DN.__SCAN_ */ /* WHERE ((DN__Z0.PARENTDN LIKE 'dc=ignite,%')

Re: Issues with sub query IN clause

2018-02-01 Thread Dmitriy Setrakyan
Rajesh, can you please show your query here together with execution plan? D. On Thu, Feb 1, 2018 at 8:36 AM, Rajesh Kishore wrote: > Hi Andrey > Thanks for your response. > I am using native ignite persistence, saving data locally and as of now I > don't have

Re: Issues with sub query IN clause

2018-02-01 Thread Rajesh Kishore
Hi Andrey Thanks for your response. I am using native ignite persistence, saving data locally and as of now I don't have distributed cache, having only one node. By looking at the doc, it does not look like affinity key is applicable here. Pls suggest. Thanks Rajesh On 1 Feb 2018 6:27 p.m.,

Re: Issues with sub query IN clause

2018-02-01 Thread Andrey Mashenkov
Hi Rajesh, Possibly, you data is not collocated and subquery return less retults as it executes locally. Try to rewrite IN into JOIN and check if query with query#setDistributedJoins(true) will return expected result. It is recommended 1. replace IN with JOIN due to performance issues [1]. 2.