Hello,

Sorry for late response. 

If you will see first message of this third, you will understand that
initially I had used same schema. But collocation were not working. 

By the way, now I have again inserted sample data (sent in previous
messages) as per your suggestion .

1000 cities and 3 countries. 

1st Country = 500 cities
2nd Country = 300 cities
3rd Country = 200 cities

CREATE TABLE Country ( 
country_id INT(10), 
country_name CHAR(30), 
Continent  CHAR(30),
PRIMARY KEY (country_id)
) WITH "template=partitioned, backups=1"; 


CREATE TABLE City ( 
city_id INT(15),
country_id INT(10), 
city_name CHAR(50), 
Dist CHAR(20), 
PRIMARY KEY (city_id,country_id) 
) WITH "template=partitioned, backups=1, affinityKey=country_id"; 

output :

select count(*) from City c join Country cc on cc.country_id = c.country_id 
;
=> Count = 1000

select count(*) from City c join Country cc on cc.country_id !=
c.country_id;
=> Count = 800 

Do you think data is collocated ? 

So what are the logical explanation for count=1000 for first query and count
= 800 for second query.


Thanks,
Nilesh





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to