If I understand correctly T1 and T2 can have repeated rows. But cache always identifies entries by some key. What is key for this tables in your case? How do you put entries into cache?
The other question is how DEV_ID and DEV_LV columns It seems that in current data scheme there is only one way to colocate data correctly: - T1 replicated cache - T2 replicated cache - T3 partitioned cache There is no need any affinity keys. But if T1 and T2 are large datasets then such colocation will be ineffective. Another way to colocate datasets like this it have compound key that contains all table columns. But it lead to ineffective memory consumption because all value data is duplicated in the key. See code example here: https://gist.github.com/agura/8a2ce3d028d4b69c9a07 On Tue, Nov 3, 2015 at 1:33 PM, iceguo <[email protected]> wrote: > Thank you for your kindness. > > Could you please help me to collocate the following object? > > CREATE TABLE T1 > ( LAT_ID SMALLINT, > DEV_ID VARCHAR(20), > DEV_LV SMALLINT > ); > > CREATE TABLE T2 > ( THE_DATE DATE, > DEV_ID VARCHAR(20), > DEV_LV SMALLINT > ); > > CREATE TABLE T3 > ( ID INTEGER PRIMARY KEY NOT NULL, > DEV_TYPE VARCHAR(200), > DEV_ID VARCHAR(100) > ); > > p.s: > table T1 and T2 have no primary key. > > SQL query: > SELECT t1.* from t1,t2,t3 where t2.DEV_ID = t1.DEV_ID and > t2.DEV_LV = t1.DEV_LV and > t1.DEV_ID = t3.DEV_ID; > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/The-result-of-cross-cache-SQL-joins-is-incomplete-tp1723p1819.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Andrey Gura GridGain Systems, Inc. www.gridgain.com
