Post

3 followers Follow
0
Avatar

colocation with partitioned tables

I have a parent table with a composite primary key which is build using three columns.I have a child table which has only one of those columns as a foreign key reference.Now if I partition the parent table by primary key and colocate the child table with the parent table.... the child table also I need to partition by the same set of columns but it does not have all the 3 columns...is there a solution for this?

arghya sadhu

Please sign in to leave a comment.

5 comments

0
Avatar

Can you not simply partition the parent table by the single column? Remember that the partitioning scheme is not coupled to the primary key.

Jens Deppe 0 votes
0
Avatar

Yeah that's what I am gonna do..Just wanted to check if there is something else....So the only point to remember is the same set of keys should be used for partitioning the parent and child table right?

arghya sadhu 0 votes
0
Avatar

Can you explain why its required to partition the parent and child table with same partitioning strategy...I know its required for gemfire xd to co locate but I want to know why its required for co location?

arghya sadhu 0 votes
0
Avatar

It is only required that you partition them the same way if you want to join across them. If there is no requirement for joins you can partition them by anything you want.

Michael Stolz 0 votes
0
Avatar

You would set up colocation so that a join query (across those tables) can be run in parallel, on each node, and all data necessary for that query, is thus local to the node.

Jens Deppe 0 votes