楼主: dylloveyou

[精华] cache OR oracle

[复制链接]
论坛徽章:
12
行业板块每日发贴之星
日期:2005-10-03 01:02:412010新春纪念徽章
日期:2010-03-01 11:07:22行业板块每日发贴之星
日期:2009-12-14 01:01:022009日食纪念
日期:2009-07-22 09:30:00行业板块每日发贴之星
日期:2008-08-31 01:03:272008新春纪念徽章
日期:2008-02-13 12:43:03行业板块每日发贴之星
日期:2007-12-24 01:06:15ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44会员2007贡献徽章
日期:2007-09-26 18:42:10行业板块每日发贴之星
日期:2006-03-19 01:02:12
51#
发表于 2006-6-15 22:15 | 只看该作者
我也很想知道。
数组的定位好像有直接计算、顺序查找、树查找、散列法等,按资料介绍CACHE用的是稀疏数组,不知道是怎么存储和查找的。

使用道具 举报

回复
论坛徽章:
0
52#
发表于 2006-6-15 22:39 | 只看该作者
Cache'联机帮助中查到的:
Physical Structure of Globals
Globals are stored within physical files using a highly optimized structure. The code that manages this data structure is also highly optimized for every platform that Caché runs on. These optimizations ensure that operations on globals have high throughput (number of operations per unit of time), high concurrency (total number of concurrent users), efficient use of cache memory, and require no ongoing performance-related maintenance (such as frequent rebuilding, re-indexing, or compaction).
The physical structure used to store globals is completely encapsulated; applications do not worry about physical data structure in any way.
Globals are stored on disk within a series of data blocks; the size of each block (typically 8KB) is determined when the physical database is created. To provide efficient access to data, Caché maintains a sophisticated B-tree-like structure that uses a set of pointer blocks to link together related data blocks. Caché maintains a buffer pool — an in-memory cache of frequently referenced blocks — to reduce the cost of fetching blocks from disk.
While many database technologies use B-tree-like structures for data storage, Caché is unique in many ways:
The storage mechanism is exposed via a safe, easy-to-use interface.
Subscripts and data are compressed to save disk space as well as valuable in-memory cache space.
The storage engine is optimized for transaction processing operations: inserts, updates, and deletes are all fast. Unlike relational systems, Caché never requires rebuilding indices or data in order to restore performance.
The storage engine is optimized for maximum concurrent access.
Data is automatically clustered for efficient retrieval.

使用道具 举报

回复
论坛徽章:
0
53#
发表于 2006-6-15 22:40 | 只看该作者
How Globals Are Stored
Within data blocks, globals are stored sequentially. Both subscripts and data are stored together. There is a special case for large node values (long strings) which are stored within separate blocks. A pointer to this separate block is stored along with the node subscript.
For example, suppose you have a global with the following contents:
^Data(1999) = 100
^Data(1999,1) = "January"
^Data(1999,2) = "February"
^Data(2000) = 300
^Data(2000,1) = "January"
^Data(2000,2) = "February"
Most likely, this data would be stored within a single data block with a contiguous structure similar to (the real representation is a series of bytes):
Data(1999):100|1:January|2:February|2000:300|1:January|2:February|...
An operation on ^Data can retrieve its entire contents with a minimum number of disk operations.
There are a number of additional techniques used to ensure that inserts, updates, and deletes are performed efficiently.

使用道具 举报

回复
论坛徽章:
5
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44行业板块每日发贴之星
日期:2008-07-01 01:02:17
54#
发表于 2006-6-16 08:18 | 只看该作者
没看出来Caché的存储有什么特别的,觉得有些象oracle的cluster table?介绍太少,没法判断

使用道具 举报

回复
论坛徽章:
0
55#
发表于 2006-6-16 10:11 | 只看该作者
下一个Cache'单机版,联机帮助里都有。

使用道具 举报

回复
论坛徽章:
0
56#
发表于 2006-6-16 13:51 | 只看该作者
Oracle的Cluster是按某个规则将符合这个规则的记录尽可能存储在同一个block里,以此来提高某种特定查询条件的速度(很好理解,它的目标是减少IO)。所以,不论是"Clustering By Hash"还是"Clustering By Index",都有副作用:
1.大量的磁盘空间浪费
2.需要大量的管理(所以Oracle DBA很值钱)
3.不是灵活的方案,只适用于特定查询条件

而Cache'是完全不同的方案:
1.由于Cache'不存空字段,所以本身所需空间就小
2.Cache'可以通过类之间的关系选择进行集中存储,例如对父子关系,会将父对象和子对象存储在一起,对事物操作这会大大节省IO
3.Cache'对于高级用户,可以通过自定义多维数组格式来提高效率,而且对SQL和Object访问方式透明,不需修改代码

使用道具 举报

回复
论坛徽章:
12
行业板块每日发贴之星
日期:2005-10-03 01:02:412010新春纪念徽章
日期:2010-03-01 11:07:22行业板块每日发贴之星
日期:2009-12-14 01:01:022009日食纪念
日期:2009-07-22 09:30:00行业板块每日发贴之星
日期:2008-08-31 01:03:272008新春纪念徽章
日期:2008-02-13 12:43:03行业板块每日发贴之星
日期:2007-12-24 01:06:15ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44会员2007贡献徽章
日期:2007-09-26 18:42:10行业板块每日发贴之星
日期:2006-03-19 01:02:12
57#
发表于 2006-6-16 14:07 | 只看该作者
没说到CACHE内部是怎么存储和查找的。看不懂英文。
如果是我说的那些,也就明白了,如果不是那些,又是什么方法呢?

使用道具 举报

回复
论坛徽章:
0
58#
发表于 2006-6-16 15:59 | 只看该作者
这不就是吗:
To provide efficient access to data, Caché maintains a sophisticated B-tree-like structure that uses a set of pointer blocks to link together related data blocks. Caché maintains a buffer pool — an in-memory cache of frequently referenced blocks — to reduce the cost of fetching blocks from disk.
While many database technologies use B-tree-like structures for data storage, Caché is unique in many ways:
The storage mechanism is exposed via a safe, easy-to-use interface.
Subscripts and data are compressed to save disk space as well as valuable in-memory cache space.
The storage engine is optimized for transaction processing operations: inserts, updates, and deletes are all fast. Unlike relational systems, Caché never requires rebuilding indices or data in order to restore performance.
The storage engine is optimized for maximum concurrent access.
Data is automatically clustered for efficient retrieval.

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
59#
发表于 2006-6-16 19:57 | 只看该作者
尝试/实战一把就有印象了.

使用道具 举报

回复
论坛徽章:
12
行业板块每日发贴之星
日期:2005-10-03 01:02:412010新春纪念徽章
日期:2010-03-01 11:07:22行业板块每日发贴之星
日期:2009-12-14 01:01:022009日食纪念
日期:2009-07-22 09:30:00行业板块每日发贴之星
日期:2008-08-31 01:03:272008新春纪念徽章
日期:2008-02-13 12:43:03行业板块每日发贴之星
日期:2007-12-24 01:06:15ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44会员2007贡献徽章
日期:2007-09-26 18:42:10行业板块每日发贴之星
日期:2006-03-19 01:02:12
60#
发表于 2006-6-16 21:33 | 只看该作者
不是要我拿金山快译来对付吧?

使用道具 举报

回复

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

本版积分规则 发表回复

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