签到成功

知道了

CNDBA社区CNDBA社区

Oracle 12C R2-新特性-本地临时表空间

2018-01-04 10:59 4721 0 原创 Oracle 12C
作者: Expect-乐

说明

12.2中引入了一个新的概念“本地临时表空间”,而之前版本中的临时表空间则被称为“共享临时表空间”。

当很多read-only实例访问一个数据库时,本地临时表空间可以提高涉及到排序查询的性能。

共享的临时表空间在共享磁盘上存储临时文件,以便所有数据库实例都可以访问临时表空间。相反,本地临时表空间为每个数据库实例存储单独的、非共享的临时文件。本地临时表空间对于Oracle Real Application Clusters Oracle Flex Clusters很有用。

可以在read-onlyread/write数据实例上创建本地临时表空间。

临时表空间优点:http://www.cndba.cn/Expect-le/article/2540

1. Improving I/O performance by using local rather than shared disk storage

2. Avoiding expensive cross-instance temporary space management

3. Improving instance startup performance by eliminating on-disk space metadata management

 

本地临时表空间和共享临时表空间对比

Shared Temporary Tablespacehttp://www.cndba.cn/Expect-le/article/2540http://www.cndba.cn/Expect-le/article/2540

http://www.cndba.cn/Expect-le/article/2540

Local Temporary Tablespacehttp://www.cndba.cn/Expect-le/article/2540

Created with the CREATE TEMPORARY TABLESPACEstatement.

http://www.cndba.cn/Expect-le/article/2540

Created with the CREATE LOCAL TEMPORARY TABLESPACE statement.

Note: A local temporary tablespaces is always a bigfile tablespace, but the BIGFILE keyword is not required in the creation statement.

Creates a single temporary tablespace for the database.http://www.cndba.cn/Expect-le/article/2540http://www.cndba.cn/Expect-le/article/2540

Creates separate temporary tablespaces for every database instance. The FOR LEAF option creates tablespaces only for read-only instances. The FOR ALL option creates tablespaces for all instances, both read-only and read/write.

Supports tablespace groups.

Does not support tablespace groups.

Stores temp file metadata in the control file.http://www.cndba.cn/Expect-le/article/2540

Stores temp file metadata common to all instances in the control file, and instance-specific metadata (for example, the bitmaps for allocation, current temp file sizes, and file status) in the SGA.

具体例子

---创建本地临时表空间,和创建普通临时表空间没什么区别,多了一个关键字“local”和“FOR ALL or FOR LEAFhttp://www.cndba.cn/Expect-le/article/2540

SQL> CREATE LOCAL TEMPORARY TABLESPACE FOR ALL cndba_local_temp
  TEMPFILE '/u01/app/oracle/oradata/orcl/cndba_local_temp01.dbf' SIZE 5M AUTOEXTEND ON;

Tablespace created.

版权声明:本文为博主原创文章,未经博主允许不得转载。

本地临时表空间

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
Expect-乐

Expect-乐

关注

Without the continuous bitter cold, there can be no fragrant plum blossom

  • 336
    原创
  • 6
    翻译
  • 100
    转载
  • 41
    评论
  • 访问:1574966次
  • 积分:1957
  • 等级:核心会员
  • 排名:第4名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ