12
返回列表 发新帖
楼主: crane_t

[讨论] 所谓"列存储"的实际是怎么回事?

[复制链接]
论坛徽章:
3
优秀写手
日期:2014-12-20 06:00:17喜羊羊
日期:2015-03-04 14:54:422015年新春福章
日期:2015-03-06 11:59:47
11#
发表于 2014-12-19 08:43 | 只看该作者
crane_t 发表于 2013-7-30 01:09
其实,我们经常访问数据库的时候用的无论是SQL语句,还是API,都把我们的思维引向“行”。这纯粹是误导。最 ...

为什么说最佳的存储应该是列? 你怎么理解的?

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
12#
发表于 2014-12-20 04:42 | 只看该作者
> 为什么说最佳的存储应该是列?

A blanket statement like that is obviously wrong. According to
https://en.wikipedia.org/wiki/Column-oriented_DBMS

"Whether or not a column-oriented system will be more efficient in operation depends heavily on the workload being automated. It would appear that operations that retrieve data for objects would be slower, requiring numerous disk operations to collect data from multiple columns to build up the record. However, these whole-row operations are generally rare. In the majority of cases, only a limited subset of data is retrieved."

So it really depends on the query. A column store is bad for queries that need many columns of a row, because you have to get the data one column at a time. Fortunately, many real-world cases only need one or very few columns at a time.

The Wikipedia page is actually quite readable. It's a very good summary of this type of database.

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表