7.解决方案一:调整buffer cache

sys@TESTDB12>alter system set sga_max_size=804m scope=spfile;        //重启数据库

sys@TESTDB12>alter system set db_cache_size=64m;       //buffer cache改为64M

7.1重新生成新的statspack报告

perfstat@TESTDB12>selectsnap_id,snap_time,snap_level from stats$snapshot order by snap_time;

SNAP_ID SNAP_TIME SNAP_LEVEL

---------- -------------------

1 28-JUL-14          7

11 28-JUL-14          7

21 28-JUL-14          7

31 28-JUL-14          7

41 29-JUL-14          7

51 29-JUL-14          7

61 29-JUL-14          7

71 29-JUL-14          7

81 29-JUL-14          7

91 29-JUL-14          7

101 29-JUL-14          7

111 29-JUL-14          7

121 29-JUL-14          7

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap:

Enter value for end_snap:

Enter value for report_name:

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap:

Enter value for end_snap:

Enter value for report_name:

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap:

Enter value for end_snap:

Enter value for report_name:

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap:

Enter value for end_snap:

Enter value for report_name:

7.2通过新生成的4个statspack报告对比各个时间段的数据缓冲区的命中率和库缓冲区的命中率:

时间

Buffer  Hit(%)

Library Hit(%)

03:32:02~ 03:47:04

99.98

85.84

03:47:04 ~04:02:02

99.94

85.63

04:02:02~ 04:17:00

99.91

85.45

04:17:00~ 04:20:02

99.87

85.33

7.3查看Top 5 Timed Events找出4 个报告中各个时间段跟磁盘I/O相关的等待事件

时间

name

Wait(s)

Time(s)

03:32:02~ 03:47:04

direct path read

13,919,074

357

log file parallel  write

3,152

17

log file sync

776

16

os thread startup

4

log file sync

157

3

os  thread startup

4

1

直接读的等待数目下降明显,说明调整buffer cache的大小时起一定作用的。

7.4造成物理读最大的前几个sql语句在报告中未找到,用sql语句查询得出这些语句:select sql_text from v$sql where disk_reads=(select max(disk_reads)from v$sql);

时间

Executions

Rows  per Exec

Sql语句

03:32:02~ 03:47:04

25,242

16.3

select /*+ rule */  bucket, endpoint, col#, epvalue from histgrm$

where obj#=:1 and intcol#=:2 and row#=:3  order by bucket

3,392

11.3

select  name,intcol#,segcol#,type#,length,nvl(precision#,0),decod

e(type#,2,nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180

,scale,181,scale,182,scale,183,scale,231,scale,0),null$,fixedsto

rage,nvl(deflength,0),default$,rowid,col#,property,  nvl(charseti

5,272

2.2

select  pos#,intcol#,col#,spare1,bo#,spare2,spare3 from icol$ whe

re obj#=:1

03:47:04 ~04:02:02

18,202

16.2

select /*+ rule */  bucket, endpoint, col#, epvalue from histgrm$

where obj#=:1 and intcol#=:2 and row#=:3  order by bucket

2,640

11.3

select  name,intcol#,segcol#,type#,length,nvl(precision#,0),decod

e(type#,2,nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180

,scale,181,scale,182,scale,183,scale,231,scale,0),null$,fixedsto

rage,nvl(deflength,0),default$,rowid,col#,property,  nvl(charseti

04:02:02~ 04:17:00

45,327

16.4

select  /*+ rule */ bucket, endpoint, col#, epvalue from histgrm$

where obj#=:1 and intcol#=:2 and row#=:3  order by bucket

3,954

10.3

select  name,intcol#,segcol#,type#,length,nvl(precision#,0),decod

e(type#,2,nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180

,scale,181,scale,182,scale,183,scale,231,scale,0),null$,fixedsto

rage,nvl(deflength,0),default$,rowid,col#,property,  nvl(charseti

04:17:00~ 04:20:02

15,422

个时间段中Buffer Pool Advisory建议可以看的出来,和之前64的相比差别并不大

7.6查看Time Model System Stats

个报告各个时间段中的Time Model System Stats,发现产生的硬解析比较少,正常。

7.7查看Latch Sleep breakdown

个sp报告各个时间段的Latch Sleepbreakdown的内容,发现cache bufferslru chain的miss和sleep的次数并不多。

部署statspack工具(二)之解决方案1的更多相关文章

  1. 部署statspack工具(一)

    禁用sga自动管理机制,分配比较小的数据缓冲区(30m)和共享池(70m)空间 1.1关闭SGA自动管理机制 查看是否开启了ASSM idle>show parameter sga; NAME  ...

  2. 部署statspack工具(二)之解决方案2

    解决方案二:在emp2的empno列上面创建索引,再执行share_pool_sql_1.sh脚本,查看sp报告 8.1在emp2的empno列上创建索引 sys@TESTDB12>create ...

  3. 【tool】部署前端工具

    一.部署前端工具如下: nodejsnpmwebpackvue 二.安装nodejs 1. 下载稳当版本nodejs 2. 配置环境变量 NODE_HOME=D:\soft\nodejs\ path= ...

  4. SQL Server 2008 数据库镜像部署实例之二 配置镜像,实施手动故障转移

    SQL Server 2008 数据库镜像部署实例之二 配置镜像,实施手动故障转移 上一篇文章已经为配置镜像数据库做好了准备,接下来就要进入真正的配置阶段 一.在镜像数据库服务器上设置安全性并启动数据 ...

  5. 转:TestLink1.9.3测试用例:Excel转换XML工具<二>实现代码

    TestLink1.9.3测试用例:Excel转换XML工具<二>实现代码 http://blog.csdn.net/candle806/article/details/7490599 以 ...

  6. [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(二) -- 安装jira 7.5.4

    [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(二) -- 安装jira 7.5.4 环境都配置好以后, 开始搭建Jira的环境, 这里参考了一篇文 ...

  7. 小程序入口构造工具&二维码测试工具

    小程序入口构造工具&二维码测试工具 本文将介绍我们小程序中隐藏的两个工具页面.原理虽不复杂,收益却实实在在,或许也能给诸君带来启发. 入口构造工具 痛点 PM&运营 投放链接 PM&a ...

  8. Python实现C代码统计工具(二)

    目录 Python实现C代码统计工具(二) 声明 一. 问题提出 二. 代码实现 三. 效果验证 Python实现C代码统计工具(二) 标签: Python 代码统计 声明 本文将对<Pytho ...

  9. iis 部署webapi常见错误及解决方案

    iis 部署webapi常见错误及解决方案 错误一: 原因:asp.net web api部署在Windows服务器上后,按照WebAPI定义的路由访问,老是出现404,但定义一个静态文件从站点访问, ...

随机推荐

  1. Quartz总结(一):Quartz集成Spring的2个方法

    零.引言 关于Spring集成Quartz有2种方法: 1. JobDetailBean. 2. MethodInvokeJobDetailFactoryBean. 以下从自身使用和理解以及掌握的知识 ...

  2. gcd timer

    //0.创建队列 dispatch_queue_t queue = dispatch_get_global_queue(, ); NSLog(@"%s",__func__); // ...

  3. Struts2不配置result参数 进行跳转实现

    的 this.getRequest().getRequestDispatcher("url").forward(this.getRequest(),this.getResponse ...

  4. Alcatraz:插件管理

    安装: 终端粘贴 "curl -fsSL https://raw.github.com/alcatraz/Alcatraz/master/Scripts/install.sh | sh&qu ...

  5. gulp用法

    转载:http://segmentfault.com/blog/laopopo/1190000000372547 http://javascript.ruanyifeng.com/tool/gulp. ...

  6. js 日期控件laydate使用

    官网  http://sentsin.com/layui/laydate/ 1. 下载官网上的压缩包,解压后只需要复制laydate 文件夹到你的项目中; 2. 在页面引入  <script t ...

  7. (简单) POJ 1511 Invitation Cards,SPFA。

    Description In the age of television, not many people attend theater performances. Antique Comedians ...

  8. redhat7 常用命令

    关闭防火墙 systemctl stop firewalld 查看防火墙状态 systemctl status firewalld 永久关闭防火墙命令.重启后,防火墙不会自动启动.systemctl ...

  9. UCOSII在STM32F1上的移植

    UCOSII在STM32F1上的移植 首先准备好一份STM32F1的工程.UCOSII源码. 在准备好的工程中新建一个"UCOSII"文件夹(或者取其它名字也行): UCOSII文 ...

  10. IOS开发-OC学习-NSTimer的使用

    上一篇博客中在改变属性值的时候使用了timer进行自动改变.关于NSTimer的更详细的用法如下: 定义一个NSTimer类型的timer,和一个count,其中timer是定时器,count是计数的 ...