日期:2014-05-18  浏览次数:20672 次

关于大字段的分离
比如表AB,content存大量的数据.
create   table   AB
(
id   int,
name   varchar(30),
content   text
)
有人说分成
create   table   A
(
id   int,
name   varchar(30),
)

create   table   B
(
id   int,
content   text
)
这样在查询  
select   id,name   from   A   比   select   id,name   from   AB   速度更快

请指教

------解决方案--------------------
个人觉行没必要
------解决方案--------------------
只要是没有选择text字段,应该不影响速度
------解决方案--------------------
根本没有必要,这样分开反而会降低效率,因为当你要同时取name和content时必须两表join,没有一个表直接查询的性能好。