前情提要:

Oracle OpenWorld 2013中Larry Ellison爆料的Oracle新特性:Oracle In Memory Database Option

1. 这个新特性将随着12.1.0.2发布;

2. In memory database option不会取代TimesTen(以下简称TT),因为这是两种层面的产品,TT还是会架在DB层之前,和应用紧密相连,为应用提供缓存,in memory database option在DB层,可以做到高可用如RAC,DG等一些TT无法实现的架构。另外同样道理,in memory database option也不会替代Exalytics;

3.In memory database option引入了列存储

4.Oracle In-Memory Columnar Compression,提供2倍到10倍的压缩率;

5.显著增快SQL的全表扫描处理速度, 全表扫描将增快10~100倍,基于CPU的最大数据处理速度,对于简单扫描可以每秒扫描10亿行数据;  对于简单的连接过滤谓词最终选出少量数据行的达到每秒1亿条每秒;

6.显著增快事务处理,DML操作-单行DML和批量DML都将运行地更快; 单行的处理收益主要来源于降低10倍的索引维护;

7.100%的应用程序透明。类似于OLTP压缩,主要的优势在于对于应用而言完全透明。所有的其他ORACLE特性均将可以与in-memory option一起工作,包括partitioning, indexes, text indexes,而没有明确的数据类型或者存储类型限制。

最近,Oracle12.1.0.2发布了,下载地址:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html?ssSourceSiteId=ocomen

目前只有Linux和Solaris版本。

安装Linux虚拟机和Oracle12.0.1.2,参考以下链接(在此非常感谢潇湘隐者):

http://www.cnblogs.com/kerrycode/archive/2013/09/13/3319958.html

环境Ready后,研究下Oracle 官方的技术说明:

http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory-2245633.html

大致整理了下:

1.Row Format vs. Column Format

Oracle Database In-Memory (Database In-Memory) provides the best of both worlds by allowing data
to be simultaneously populated in both an in-memory row format (the buffer cache) and a new inmemory
column format.

Note that the dual-format architecture does not double memory requirements. The in-memory
column format should be sized to accommodate the objects that must be stored in memory, but the
buffer cache has been optimized for decades to run effectively with a much smaller size than the size
of the database. In practice it is expected that the dual-format architecture will impose less than a 20%
overhead in terms of total memory requirements. This is a small price to pay for optimal performance
at all times for all workloads.

同时支持Row Format vs. Column Format,内存使用没有翻倍。

2.The In-Memory Column Store

Database In-Memory uses an In-Memory column store (IM column store), which is a new component
of the Oracle Database System Global Area (SGA), called the In-Memory Area. Data in the IM column
store does not reside in the traditional row format used by the Oracle Database; instead it uses a new
column format. The IM column store does not replace the buffer cache, but acts as a supplement, so
that data can now be stored in memory in both a row and a column format.
The In-Memory area is a static pool within the SGA, whose size is controlled by the initialization
parameter INMEMORY_SIZE (default 0). The current size of the In-Memory area is visible in V$SGA. As
a static pool, any changes to the INMEMORY_SIZE parameter will not take effect until the database
instance is restarted. It is also not impacted or controlled by Automatic Memory Management (AMM).
The In-Memory area must have a minimum size of 100MB.
The In-Memory area is sub-divided into two pools: a 1MB pool used to store the actual column
formatted data populated into memory, and a 64K pool used to store metadata about the objects that
are populated into the IM column store. The amount of available memory in each pool is visible in the
V$INMEMORY_AREA view. The relative size of the two pools is determined by internal heuristics, the
majority of the In-Memory area memory is allocated to the 1MB pool.

SGA区增加了一个新组件:In-Memory Area,静态池,大小通过参数InMemory_Size(默认0)控制,修改后必须重启数据库生效。

最小值100M,其内部包含两个池:

1MB pool :存储内存中实际的列格式数据

64K pool:内存列存储涉及对象的元数据MetaData

3. Populating The In-Memory Column Store  添加到内存列存储

Database In-Memory adds a new INMEMORY attribute for tables and materialized views. Only objects with the
INMEMORY attribute are populated into the IM column store. The INMEMORY attribute can be
specified on a tablespace, table, (sub)partition, or materialized view.

增加INMEMORY选项,支持表空间、表、分区、物化视图

1.表空间级别设置INMEMORY,表空间下所有新的表、物化视图将被加载到内存列存储中。

If it is enabled at the tablespace
Oracle Database In-Memory option 5 level, then all new tables and materialized views in the tablespace will be enabled for the IM column
store by default.
ALTER TABLESPACE ts_data INMEMORY;

2. 表级别设置INMEMORY,支持排除指定的列、支持表的分区

ALTER TABLE sales INMEMORY;

ALTER TABLE sales INMEMORY NO INMEMORY(prod_id);

for a partitioned table, all of the table's partitions inherit the in-memory attribute but it’s
possible to populate just a subset of the partitions or sub-partitions.

ALTER TABLE sales MODIFY PARTITION SALES_Q1_1998 NO INMEMORY;

3.支持内存加载优先级配置

ALTER TABLE customers INMEMORY PRIORITY CRITICAL;

4.同时还有一些限制,不是所有的表都可以加载到内存列存储中

Sys用户、Systemn、SysAux表空间下的对象不能使用INMEMORY选项,

索引组织表、聚集表不能使用INMEMORY选项

不支持的数据类型:LONGS (deprecated since Oracle Database 8i);   Out of line LOBS

同时对象如果小于64K,考虑到内存空间消耗,将不会加载到内存列存储中。

5. In-Memory Compression 内存压缩

然后本文第二大部分:基于上述特性,进行了实际业务数据测试。

从上述测试的情况看,虽然是虚拟机环境,但是测试了多次。

从测试结果看,大批量Insert和Update的性能有所下降,大批量Delete性能有所提升,查询性能提升还是非常明显,如果内存足够,估计会再有提高。

Oracle 12c In Memory Option初探的更多相关文章

  1. oracle 12c 列式存储 ( In Memory 理论)

    随着Oracle 12c推出了in memory组件,使得Oracle数据库具有了双模式数据存放方式,从而能够实现对混合类型应用的支持:传统的以行形式保存的数据满足OLTP应用:列形式保存的数据满足以 ...

  2. Oracle 12C 新特性之 恢复表

    RMAN的表级和表分区级恢复应用场景:1.You need to recover a very small number of tables to a particular point in time ...

  3. ORACLE 12C新特性——CDB与PDB

    Oracle 12C引入了CDB与PDB的新特性,在ORACLE 12C数据库引入的多租用户环境(Multitenant Environment)中,允许一个数据库容器(CDB)承载多个可插拔数据库( ...

  4. Oracle 12c CDB PDB 安装/配置/管理

    Oracle安装参考:https://www.cnblogs.com/zhichaoma/p/9288739.html 对于CDB,启动和关闭与之前传统的方式一样,具体语法如下:     STARTU ...

  5. Oracle 12c RAC 静默安装文档

    参考文档: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/index.html https://docs. ...

  6. oracle 12c直方图收集的增强

    在oracle 12c之前,收集直方图信息是相对比较耗费资源的,因为要重复扫描几次:在oracle 12c中,则有较大的提升,具体可参考https://jonathanlewis.wordpress. ...

  7. Oracle 12C -- clone a non-cdb as a pdb

    将non-CDB置为只读模式: $ sqlplus '/as sysdba' SQL> select name, decode(cdb, 'YES', 'Multitenant Option e ...

  8. Oracle 12c 搭建学习

    Oracle 12c 搭建学习 Vm workstaton10 安装linux 6.4 安装oracle12c Oracle 12c只支持64位系统 1 环境检查 [root@rac1 ~]# gre ...

  9. oracle 12c show con_name

    今天安装了一个oracle 12c的数据库做测试,在运行一个很简单的命令时出错了: SQL> show con_name concat "." (hex 2e) SP2: u ...

随机推荐

  1. antmate.css

    本文各式各样的动画来源于http://daneden.github.io/animate.css/ ,若想看效果可复制运行下文,或到该网站自行查阅. <!DOCTYPE html> < ...

  2. jQuery验证控件jquery.validate.js使用说明+中文API

    官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 学习 ...

  3. 使用TouchScript做2D按钮实现长按功能

    导入TouchScript 下载地址:https://www.assetstore.unity3d.com/#/content/7394 把TouchScript和Touch Debugger两个预设 ...

  4. chrome浏览器 模拟访问移动端

    谷歌Chrome浏览器,可以很方便地用来当3G手机模拟器.在Windows的[开始]-->[运行]中输入以下命令,启动谷歌浏览器,即可模拟相应手机的浏览器去访问3G手机网页: 谷歌Android ...

  5. Twentydaysgone

    这个暑假,在学校呆了一个月,考了两次科目二,被驾校坑了五百块,四级又挂了,段位差点掉到白银 参加二十多天工作室的培训,学长直接带着做itheima的某某安全卫士,跟着视频也迷迷瞪瞪敲完了代码,一知半解 ...

  6. Java编程中-servlet

    今天将别人的项目导入eclipse之后,出现了“The import javax.servlet cannot be resolved”错误 import javax.servlet.ServletE ...

  7. poj1007-DNA Sorting(排序)

    一,题意: 输入N个字符串,按照字符串的逆序数由最少到最大开始输出. 注意:如果逆序数相同,就原来顺序输出. 二,思路步骤: 1,输入,并用a[]存储每行字符串的逆序数; 2,冒泡排序a[]的同时换掉 ...

  8. CentOS下设置默认JDK

    最近在弄Linux,用yum源安装opnjdk-devel版本后,用命令ll /etc/alternatives/java查看,发现指向的是jre目录,而不是jdk,在此设置指向jdk目录. 1. 设 ...

  9. javascript中矩形的碰撞检测---- 计算碰撞部分的面积

    今天在做一个拖拽改变元素排序的东西的时候,在做被拖动元素同时碰撞到两个元素时,究竟应该与哪个元素交换位置的问题上,纠结到崩溃,实在是想不到别的办法去做了,只能去想办法计算碰撞的面积. 这应该不是最合适 ...

  10. EntityFramework Reverse POCO Code First 生成器

    功能强大的(免费)实体框架工具 Julie Lerman 实体框架是开源的,因此开发社区可以在 entityframework.codeplex.com 上共享代码. 但是不要将自己局限在那里寻找工具 ...