我可以在这个表上应用mysql分区吗?
我有这张桌子我可以在这个表上应用mysql分区吗?,mysql,database-partitioning,Mysql,Database Partitioning,我有这张桌子 CREATE TABLE IF NOT EXISTS `posts` ( `id` int(10) unsigned NOT NULL auto_increment, `thread_id` int(10) unsigned NOT NULL, `forum_id` tinyint(5) unsigned NOT NULL, `cat_id` tinyint(3) unsigned NOT NULL, `message` mediumtext collate u
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(10) unsigned NOT NULL auto_increment,
`thread_id` int(10) unsigned NOT NULL,
`forum_id` tinyint(5) unsigned NOT NULL,
`cat_id` tinyint(3) unsigned NOT NULL,
`message` mediumtext collate utf8_unicode_ci NOT NULL,
`userid` int(10) unsigned NOT NULL,
`date` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `thread_id` (`thread_id`),
KEY `userid` (`userid`),
KEY `date` (`date`),
KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3273548 ;
如何在它上应用分区?我可以使用的最佳分区类型是什么
疑问是
选择id、用户id、来自帖子的消息,其中thread\u id=%
加入一些
注:表为2.5 GiB
- 不太了解MySQL分区:(
- 检查你的索引
- 从MyISAM移动到InnoDB->this 这将使查询更加复杂 缓慢但不阻塞
- 在shard尝试之前
- 检查你的索引
- 从MyISAM移动到InnoDB->this 这将使查询更加复杂 缓慢但不阻塞
- 在shard尝试之前