Post

2 followers Follow
1
Avatar

joins on partitioned table

I have a customer table which has customer id as the primary key,an order table which has order id as the primary key and a foreign key customer id which refers to the customer id in the customer table.I also have an order items table which has order id column as a foreign key which refers to the order id in the order table.I have partitioned the customer and order table with customer id and colocated the order table with customer table.But I want to perform joins on all the 3 tables.To do that I need to colocate the otder item table also with order table.But for that I need to partition the order item table with the same partition key I.e customer id...but order item table do not have any customer id at all.So how do I do it?This scenario is given in the user guide of gemfire xd....but how to make it work?

arghya sadhu

Please sign in to leave a comment.

3 comments

0
Avatar

You will need to partition all three tables by some common attribute. Probably easiest to just copy the customer id into the items.

Michael Stolz 0 votes
0
Avatar

It says you need to partition the order_details by customerID as well. You need to have that column in the order_detail record to do that.

Michael Stolz 0 votes