mysql cluster 建表和转引擎问题
mysql 版本 5.1.47 -ndb-7.1.5-cluster现有表结构
CREATE TABLE IF NOT EXISTS `ret_article_1` (
`article_id` varchar(255) NOT NULL,
`article_name` varchar(255) NOT NULL,
`article_img_url` varchar(255) NOT NULL,
`article_deep_link` varchar(255) NOT NULL,
`article_price` varchar(255) NOT NULL,
`article_description` varchar(255) NOT NULL,
`article_category` varchar(255) NOT NULL,
`article_category_small_img_url` varchar(255) NOT NULL,
`article_category_medium_img_url` varchar(255) NOT NULL,
`article_category_big_img_url` varchar(255) NOT NULL,
`article_category_img_url_120x600` varchar(255) NOT NULL,
`article_category_img_url_160x600` varchar(255) NOT NULL,
`article_category_img_url_255x250` varchar(255) NOT NULL,
`article_category_img_url_468x60` varchar(255) NOT NULL,
`article_category_img_url_728x90` varchar(255) NOT NULL,
`article_currency_type` varchar(255) NOT NULL,
`article_brand` varchar(255) NOT NULL,
`update_time` int(10) NOT NULL,
PRIMARY KEY (`article_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
MyISAM转 ndbcluster 报错
#1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8052. You have to change some columns to TEXT or BLOBs
查询了mysql cluster 建表限制后将表结构改为
CREATE TABLE IF NOT EXISTS `ret_article_1` (
`article_id` varchar(255) NOT NULL,
`article_name` varchar(255) NOT NULL,
`article_img_url` text NOT NULL,
`article_deep_link` text NOT NULL,
`article_price` varchar(55) NOT NULL,
`article_description` text NOT NULL,
`article_category` varchar(255) NOT NULL,
`article_category_small_img_url` text NOT NULL,
`article_category_medium_img_url` text NOT NULL,
`article_category_big_img_url` text NOT NULL,
`article_category_img_url_120x600` text NOT NULL,
`article_category_img_url_160x600` text NOT NULL,
`article_category_img_url_255x250` text NOT NULL,
`article_category_img_url_468x60` text NOT NULL,
`article_category_img_url_728x90` text NOT NULL,
`article_currency_type` text NOT NULL,
`article_brand` text NOT NULL,
`update_time` int(10) NOT NULL,
PRIMARY KEY (`article_id`)
) ENGINE=ndbclusterDEFAULT CHARSET=utf8;
第一觉得那么多text 会影响效率 请问有什么优化方法嘛?
第二当建立到第16张表时报错
CREATE TABLE IF NOT EXISTS `ret_article_16` (
`article_id` VARCHAR( 255 ) NOT NULL ,
`article_name` VARCHAR( 255 ) NOT NULL ,
`article_img_url` TEXT NOT NULL ,
`article_deep_link` TEXT NOT NULL ,
`article_price` VARCHAR( 55 ) NOT NULL ,
`article_description` TEXT NOT NULL ,
`article_category` VARCHAR( 255 ) NOT NULL ,
`article_category_small_img_url` TEXT NOT NULL ,
`article_category_medium_img_url` TEXT NOT NULL ,
`article_category_big_img_url` TEXT NOT NULL ,
`article_category_img_url_120x600` TEXT NOT NULL ,
`article_category_img_url_160x600` TEXT NOT NULL ,
`article_category_img_url_255x250` TEXT NOT NULL ,
`article_category_img_url_468x60` TEXT NOT NULL ,
`article_category_img_url_728x90` TEXT NOT NULL ,
`article_currency_type` TEXT NOT NULL ,
`article_brand` TEXT NOT NULL ,
`update_time` INT( 10 ) NOT NULL ,
PRIMARY KEY ( `article_id` )
) ENGINE = NDBCLUSTER DEFAULT CHARSET = utf8
MySQL 返回:http://178.63.82.198/phpmyadmin/themes/original/img/b_help.png#1005 - Can't create table 'retargeting.ret_article_16' (errno: 708)
请问如何解决谢谢
在线等答案~~ 你用的了这么多text。都是 “无限”长。varchar不行吗
ndbcluster 引擎 varchar 多了就无法建表不知道怎么优化mysql cluster配置
页:
[1]