上篇日志提到了,那么高的负载,是存在数据块读竞争,下面介绍几个方法来消除块竟争

查找块竟争

SELECT p1 "file#", p2 "block#", p3 "class#"
FROM v$session_wait
WHERE event = 'read by other session';
如果查出来是相同的块或是相近的范围,这就是存在竞争的块或对象

找出对象

SELECT relative_fno, owner, segment_name, segment_type
FROM dba_extents
WHERE file_id = &file
AND &block BETWEEN block_id AND block_id + blocks - 1;
解决竟争
1,优化低效查询
2,重组热块数据
reinsert and delete hot row will move them to new datablock,可以减小热块提高性能,

SELECT data_object_id
FROM dba_objects
WHERE owner='&owner' AND object_name='&object';

SELECT dbms_rowid.rowid_create(1,<data_object_id>,<relative_fno>,<block>,0) start_rowid
FROM dual;
--rowid for the first row in the block

SELECT dbms_rowid.rowid_create(1,<data_object_id>,<relative_fno>,<block>,500) end_rowid
FROM dual;
--rowid for the 500th row in the block

Insert <owner>.<segment_name>
select *
FROM <owner>.<segment_name>
WHERE rowid BETWEEN <start_rowid> AND <end_rowid>

delete FROM <owner>.<segment_name>
WHERE rowid BETWEEN <start_rowid> AND <end_rowid>
3,调整 PCTFREE
djusting the PCTFREE value downward for an object will reduce the number of rows physically stored in a block

Note: PCTFREE is still required even with ASSM because it determines how rows will be packed into blocks, while freelists, pctused and pctincrease are ignored with ASSM because they are used for transaction/block management

4,把hot 对象移动到小block size tablespace中 如 2k block size

5,优化索引
a low cardinality index has a relatively small number of unique values, e.g. a column containing state data with only 50 values. Similar to inefficient queries, the use of a low cardinality index could cause excessive number of blocks to be read into the buffer cache and cause premature aging out of “good” blocks

6,反转索引优化 减小index block 竟争

7,cluster hash table, hash partition table 来打算数据

消除热块(hot block)的更多相关文章

  1. oracle 定位热块和热链的方法

    定位热链的方法 declare        v_num number;begin        for i in 1..1000000        loop                sele ...

  2. css中margin重叠和一些相关概念(包含块containing block、块级格式化上下文BFC、不可替换元素 non-replaced element、匿名盒Anonymous boxes )

    平时在工作中,总是有一些元素之间的边距与设定的边距好像不一致的情况,一直没明白为什么,最近仔细研究了一下,发现里面有学问:垂直元素之间的margin有有互相重叠的情况:新建一个BFC后,会阻止元素与外 ...

  3. cache buffers chains以及热块解决方案

    cache buffers chains以及热块解决方案 今天是2013-10-10,今天下午我调休了,中午饭过后从14点一直睡到16点,这种感觉真爽.  之前学习过关于buffer cache的ca ...

  4. 读取模式下cbc latch的事件模拟(热块竞争和热链竞争)-P62

    文章目录 1. 背景 2. 过程 2.1 热块竞争 2.1.1 版本11.2.0.1.0 2.1.1.1 session 1(sid:34) 2.1.1.2 session 2(sid:35) 2.1 ...

  5. 包含块( Containing block ) 转自W3CHelp

    包含块简介 在 CSS2.1 中,很多框的定位和尺寸的计算,都取决于一个矩形的边界,这个矩形,被称作是包含块( containing block ). 一般来说,(元素)生成的框会扮演它子孙元素包含块 ...

  6. html中的块元素(Block)和内联元素(Inline)(转)

    我们首先要了解,所有的html元素,都要么是块元素(block).要么是内联元素(inline).下面了解一下块元素.内联元素各自的特点: 块元素(block)的特点: 1.总是在新行上开始:2.高度 ...

  7. CSS包含块containing block详解

    “包含块(containing block)”,W3c中一个很重要的概念,今天带大家一起来好好研究下. 初步理解 在 CSS2.1 中,很多框的定位和尺寸的计算,都取决于一个矩形的边界,这个矩形,被称 ...

  8. 分布式文件系统 之 数据块(Block)

    众所周知,HDFS中以数据块(block)为单位进行存储管理.本文简单介绍一下HDFS中数据块(block)的概念,以及众多分布式存储系统(不止是HDFS)使用block作为存储管理基本单位的意义. ...

  9. CUDA软件架构—网格(Grid)、线程块(Block)和线程(Thread)的组织关系以及线程索引的计算公式

    网格(Grid).线程块(Block)和线程(Thread)的组织关系 CUDA的软件架构由网格(Grid).线程块(Block)和线程(Thread)组成,相当于把GPU上的计算单元分为若干(2~3 ...

随机推荐

  1. JavaScript几种类工厂实现原理剖析

    PS:本文参考了司徒正美的<JavaScript框架设计>,以及许多其它的书籍和网络文章,感谢作者们分享了这么好的学习资源!关于JS的类和继承的原理,见:JavaScript里的类和继承文 ...

  2. An exception occurred during configuration of persistence layer.

    配置文件放在bin文件夹下(注意:hibernate.cfg.xml文件名不要随便改动)

  3. Windows 8 Hyper-V虚拟机功能(转载)

    刚才看见一兄弟w500折腾win8 hyper-v功能,普及下吧,欢迎各位斧正 Windows 8 中 Hyper-V 3.0 的 CPU 支持说明 Windows 8 将直接内置 Hyper-V 3 ...

  4. VisualStudio2013Preview对C++11的支持(转载)

    VisualStudio2013Preview对C++11的支持 为期3天的微软Build 2013大会结束了,作为微软一年一度的开发者大会,微软也做足了功夫:很多产品(包括Windows 8.1和V ...

  5. JavaScript---网络编程(9-2)--DHTML技术演示(2-2)-表格加强

    对上篇博客的最后那个表格隔行高亮显示加了个功能,鼠标监听和年龄从小到大排序. 演示代码: <html> <head> <title>DHTML技术演示---表格中页 ...

  6. Linux C 编译错误总结

    1. test.c:59:5: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by ...

  7. In Java, what is the default location for newly created files?

    If the current directory of the application. If e.g. you create a File by using new FileOutputStream ...

  8. poj 1193 内存分配

    好麻烦的模拟题,一次性过了就好!!!不过用了两天哦.. 小伙伴们慢慢做哦. #include <iostream> #include <list> #include <q ...

  9. hibernate.Session简介

    ★→→SessionFactory (org.hibernate.SessionFactory) 包含已经编译的映射(mappings),是制造session的工厂,可能含有一些可以在各个事务(tra ...

  10. storm单机版安装配置

    1,install zeromq 期间可能出现:configure: error: cannot link with -luuid, install uuid-dev. 因此可以先安装 sudo ap ...