Hi val 1. If the second execution plan is for reduce phase, should it come in queries which includes affinity key in their where clause? Because there is going to be no reduce phase in this case.
2. Is it mandatory to anotate affinity id field in my key class with @QueryField? Without this annotation I was getting error something like field not found? 3. E.g. if my all cache's data is colacated on same affinity key i.e. subscriptionId. Select * from cache1 c1 join cache2 c2 on ( c1.userId = c2.userId) Where c1.affinityId = ? And c2.affinityId = ? In above example, to execute the SQL only on single data node is it enough to write only one condition i.e. "c1.affinityId = ?". Or Do I have to write affinityId in where clause for every cache involved in sql like "cach2.affinityId =?" 4. If the ignite automatically creates index on affinity key field then why it is not showing in execution plan? Thanks, Prasad On Tue, Aug 28, 2018, 1:48 AM vkulichenko <[email protected]> wrote: > Hi Prasad, > > 1. First plan is for map phase (executed on server side) and the second one > is for reduce phase (executed on client side). Merge scan means that it > just > merges result sets from all participating server nodes. Sometime it can > contain additional reduce steps like final groupings, ordering, etc. > > 2. This sounds like index is not actually declared correctly and doesn't > exist. Most likely this is reason why Ignite doesn't use it automatically > as > well. Please show your full indexing configuration. > > 3. Of course you can, it can participate in any indexes as any other field. > Individual index for affinity key field is created automatically. > > 4. Unfortunately, I don't think there is a way to check this except > debugging the code. > > 5. That depends on what is the foreign key. As a matter of fact, I'm a bit > confused by the query. Looks like the affinity key is not the one you join > on. That means that join is not collocated which is likely to cause > performance issues and/or incorrect results. > > 6. Can you give a particular query example? > > -Val > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
