当前位置: 代码迷 >> Sql Server >> 关于大字段的分离解决办法
  详细解决方案

关于大字段的分离解决办法

热度:89   发布时间:2016-04-27 17:01:36.0
关于大字段的分离
比如表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,没有一个表直接查询的性能好。
  相关解决方案