MySQL Forums :: Partitioning :: How to partition that table?

Advanced Search

How to partition that table?
Posted by: Klaus Redegeld ()
Date: June 30, 2011 07:49AM

I've a table which is getting slower when writing or reading by the unique key. Will partitioning solve this problem?

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `protocol` tinyint(3) unsigned NOT NULL,
  `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `protocol` (`protocol`,`path`)

When I try to partition it, I get:
mysql> alter table path PARTITION by hash( id + protocol +  path ) partitions 10  ;
ERROR 1491 (HY000): The PARTITION function returns the wrong type

What's the correct way to partition such a table?


Options: ReplyQuote

Subject Views Written By Posted
How to partition that table? 4001 Klaus Redegeld 06/30/2011 07:49AM
Re: How to partition that table? 1756 Rick James 07/01/2011 11:25PM
Re: How to partition that table? 1594 Klaus Redegeld 07/03/2011 03:27AM
Re: How to partition that table? 1684 Rick James 07/03/2011 11:42AM

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.