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

There are a few enhancements in 12c that might make a big difference to performance for a small investment in effort. One of the important enhancements comes from changes in histograms – which improve speed of collection with accuracy of results. The changes are so significant that I chose the topic as my presentation at OpenWorld last year.

In 11g Oracle gave us the option for using an “approximate NDV (number of distinct values)” for rapid and accurate collection of basic column stats. In 12c Oracle extends the mechanism to frequency histograms and a new type of frequency histogram called a “Top-N” histogram (also called a “Top-Frequency”histogram). At the same time the maximum number of buckets allowed for a histogram has gone up from 254 to 2000 2048 [corrected: see note 4 below] – although the default stays at 254 and you probably don’t need to increase it in most cases (remember the side effect you might have on the sysauxtablespace as Oracle automatically retains the historical stats).

Height-balanced histograms are still relatively expensive to collect – but there is a newer type of height-balanced histogram named the “Hybrid” histogram which gives you better information than the old height-balanced for the same amount of work and, thanks to the Top-N histogram you may find that some of your old (expensive, inaccurate) height-balanced histograms are replaced by cheap, accurate Top-N histograms.

In part 2 of this mini-series I’ll describe the new mechanism for the frequency histogram and the logic of the Top-N histogram and in part 3 I’ll describe the mechanism and demonstrate the benefits of the Hybrid histogram. The takeaway from this note, though, is that you need to look at your current stats collection and think about how a small change in strategy could both reduce the workload and improve the accuracy of your histograms.

 

oracle 12c直方图收集的增强的更多相关文章

  1. ORACLE 12C RMAN 功能增强

    在ORACLE 12C中对rman的功能有了不少增强,在以前的文章中写过RMAN RECOVER TABLE功能,这里另外补充rman增强的两个小功能(sql语句和数据文件分割)数据库版本 SQL&g ...

  2. Oracle 12C RAC的optimizer_adaptive_features造成数据插入超时

    问题分析 使用10046事件追踪方式,直接生成上传时的数据库事件日志进行分析,发现主要区别在于以下两条sql语句在每次长时间上传时都有出现,并且执行用户不是上传用户,而是数据库SYS用户. ***** ...

  3. Oracle 12C 新特性之表分区带 异步全局索引异步维护(一次add、truncate、drop、spilt、merge多个分区)

    实验准备:-- 创建实验表CREATE TABLE p_andy(ID number(10), NAME varchar2(40))PARTITION BY RANGE (id)(PARTITION ...

  4. oracle 12c 新特性之不可见字段

    在Oracle 11g R1中,Oracle以不可见索引和虚拟字段的形式引入了一些不错的增强特性.继承前者并发扬光大,Oracle 12c 中引入了不可见字段思想.在之前的版本中,为了隐藏重要的数据字 ...

  5. Oracle 12C安装教程

    Oracle 12C安装教程 由 Alma 创建, 最后一次修改 2018-06-04 10:32:31 Oracle 12c,全称Oracle Database 12c,是Oracle 11g的升级 ...

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

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

  7. Oracle 12c 使用scott等普通用户的方法

    目录: 一.前言 二.使用普通用户 三.自动启动PDB 一.前言 最近电脑上安装了oracle 12c数据库,想体验下新特性.安装完后,便像11g一样在dos窗口进行下面的操作: SQL Produc ...

  8. [原创]Oracle 12c 抢先安装手迹

    [前言] Oracle 12c 终于投放市场了,唉,等了很久了.据官方说这是一个为云计算平台量身定做的版本....且不管真的假的,先让我们把它装上再说. 注:笔者在安装的过程中发现12c的安装过程,较 ...

  9. java开发连接Oracle 12c采用PDB遇到问题记录

    今天初次使用java连接Oracle 12c,遇到各种问题,为方便后续查询,在汇总了问题记录及解决方案如下. ORA-28040: No matching authentication protoco ...

随机推荐

  1. WireShark过滤器选项

    首先说几个最常用的关键字,"eq" 和 "=="等同,可以使用 "and" 表示并且,"or"表示或者."!& ...

  2. Amazon RDS 上的 Microsoft SQL Server » 导入和导出 SQL Server 数据库

    导入和导出 SQL Server 数据库 Amazon RDS 支持使用完整备份文件 (.bak 文件) 对 Microsoft SQL Server 数据库进行本机备份和还原.您可以在单个便携式文件 ...

  3. vue--postcss插件

     vue-loader里的postcss插件会帮你抹平浏览器兼容的写法

  4. python os.path模块常用方法详解

    os.path模块主要用于文件的属性获取,在编程中经常用到,以下是该模块的几种常用方法.更多的方法可以去查看官方文档:http://docs.python.org/library/os.path.ht ...

  5. Jenkins pipeline 语法详解

    原文地址http://www.cnblogs.com/fengjian2016/p/8227532.html pipeline 是一套运行于jenkins上的工作流框架,将原本独立运行于单个或者多个节 ...

  6. 地图服务报 error #2035

    参考:https://blog.csdn.net/iteye_20296/article/details/82395628 现在问题解决了,确实是config.xml里关于这个widget的配置url ...

  7. sql注入学习笔记,什么是sql注入,如何预防sql注入,如何寻找sql注入漏洞,如何注入sql攻击 (原)

    (整篇文章废话很多,但其实是为了新手能更好的了解这个sql注入是什么,需要学习的是文章最后关于如何预防sql注入) (整篇文章废话很多,但其实是为了新手能更好的了解这个sql注入是什么,需要学习的是文 ...

  8. Ubuntu中使用pip3报错

    使用pip3 出现以下错误: Traceback (most recent call last): File “/usr/bin/pip3”, line 9, in from pip import m ...

  9. windows中查看端口占用情况

    说几个命令, netstat 用于查看进程端口占用情况,用法可以使用netstat -h 查看 tasklist 列出当前进程,有进程号 findstr 用于过滤字符串 大致过程就是: 1. 使用 n ...

  10. java中垃圾回收机制中的引用计数法和可达性分析法(最详细)

    首先,我这是抄写过来的,写得真的很好很好,是我看过关于GC方面讲解最清楚明白的一篇.原文地址是:https://www.zhihu.com/question/21539353