MySQL Forums
Forum List  »  Partitioning

primary key and partition
Posted by: jason zhang
Date: June 30, 2009 03:41AM

below is my table schema:

create table test (id int(11) primary key, region_id int(11));

I'd like to partion the table with hash(region_id) because my data
is organize by regions. But mysql force to include the primary key
when partition the table.

How should I handle this? create a primary key include both id and region_id?
Does that make sense? The region_id is not unique.

Options: ReplyQuote


Subject
Views
Written By
Posted
primary key and partition
3931
June 30, 2009 03:41AM
2622
July 02, 2009 08:25AM
2549
July 06, 2009 01:54AM
2351
July 06, 2009 09:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.