MySQL Forums :: Partitioning :: primary key and partition

Advanced Search

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 3260 jason zhang 06/30/2009 03:41AM
Re: primary key and partition 2372 Rick James 07/02/2009 08:25AM
Re: primary key and partition 2327 jason zhang 07/06/2009 01:54AM
Re: primary key and partition 2102 Rick James 07/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.