In cases when there are more than 2 tables joined together it is not always
possible to achieve proper colocation. However, in vast majority of such
cases the tables being joined comply with the Star-schema concept, i.e.
some of the tables have significantly smaller number of entries. In this
case you can simply put this data into REPLICATED cache and keep in
PARTITIONED cache only entities with the large number of entries. In this
case you do not need to worry about colocation between PARTITIONED and
REPLICATED caches as entries in REPLICATED cache are present on all nodes.

There is an example in Ignite demonstrating this approach, you can take a
look
at org.apache.ignite.examples.datagrid.starschema.CacheStarSchemaExample

Hope this helps.

2015-10-31 15:14 GMT+03:00 iceguo <[email protected]>:

> I have tried according to your advises, but it failed, the result is
> incomplete.
>
> I compared the SQL querys between yours and mine, and I found something
> different.
>
> For your SQL query "emp.depid = dep.id", dep.id is primary key of table
> Department.
>
> But for my SQL query "A.mid = B.mid", B.mid is NOT primary key of table B.
>
> I want to know whether this is the reason of the problem.
>
> If this is the reason, and I can not change the relation of the tables in
> my
> SQL query, how do I deal with it?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/The-result-of-cross-cache-SQL-joins-is-incomplete-tp1723p1795.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to