MySQL Forums
Forum List  »  Partitioning

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?

CREATE TABLE `path` (
  `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`)
) ENGINE=MyISAM AUTO_INCREMENT=109781814 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

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?

Thanks,
Klaus

Options: ReplyQuote


Subject
Views
Written By
Posted
How to partition that table?
4098
June 30, 2011 07:49AM
1777
July 01, 2011 11:25PM
1711
July 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.