In this Document

  Symptoms
  Cause
  Solution

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 10.2.0.4 [Release 10.1 to 10.2]
Information in this document applies to any platform.

SYMPTOMS

A delete from smon_scn_time is performing excessive gets and executions as viewed from AWR report:

Buffer Gets Executions Gets per Exec %Total CPU Time (s) Elapsed Time (s) 
205,501,888 30,508 6,736.00 54.05 9,733.97 61,180.96  delete from smon_scn_time where... 

The AWR report shows the following SQL with  an excessive amount of executions:

delete from smon_scn_time where thread=0 and time_mp = (select min(time_mp) from smon_scn_time where thread=0);

CAUSE

There are inconsistencies between the indexes and table smon_scn_time.

The delete statement deletes the oldest rows from smon_scn_time to clear space for new rows.  SMON wakes up every 5 minutes and checks how many on-disk mappings we have--the max is 144000.

The new mappings are then added for the last period (since SMON last updated), and if this is over 144000, SMON will then issue the delete statement:

delete from smon_scn_time where thread=0 and time_mp = (select min(time_mp) from smon_scn_time where thread=0)

There will be an execution of this each time SMON wakes to update smon_scn_time, and if one deletion does not free enough mappings, then there will be multiple executions.

What happens is due to the inconsistency between the table and indexes the delete returns zero rows; so the delete statement is executed continuously to reduce the smon_scn_time below the maximum 14400 mappings.

When table smon_scn_time is analyzed we see the inconsistency:

SQL> analyze table smon_scn_time validate structure cascade;

analyze table smon_scn_time validate structure cascade
*
ERROR at line 1 :
ORA-01499: table/Index Cross Reference Failure - see trace file

SOLUTION

To implement the solution, please execute the following steps:

1. Ensure you have a usable backup in case of failures

2. Drop and recreate the indexes on table smon_scn_time

connect / as sysdba
drop index smon_scn_time_scn_idx;
drop index smon_scn_time_tim_idx;
create unique index smon_scn_time_scn_idx on smon_scn_time(scn);
create unique index smon_scn_time_tim_idx on smon_scn_time(time_mp);
analyze table smon_scn_time validate structure cascade;

High Executions Of Statement "delete from smon_scn_time..."的更多相关文章

  1. SMON功能-SMON_SCN_TIME字典基表

    SMON后台进程的作用还包括维护SMON_SCN_TIME基表. SMON_SCN_TIME基表用于记录过去时间段中SCN(system change number)与具体的时间戳(timestamp ...

  2. Oracle 后台进程(五)SMON进程

    转载自:刘相兵 Maclean Liu 文章 你所不知道的后台进程 SMON 功能   SMON(system monitor process)系统监控后台进程,有时候也被叫做 system clea ...

  3. SQL语法基础之DELETE语句

    SQL语法基础之DELETE语句 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看帮助信息 1>.查看DELETE的帮助信息 mysql> ? DELETE Na ...

  4. JDBC——Statement执行SQL语句的对象

    Statement该对象用于执行静态SQL语句并返回它产生的结果.表示所有的参数在生成SQL的时候都是拼接好的,容易产生SQL注入的问题 PreparedStatement对象是一个预编译的SQL语句 ...

  5. 【体系结构】有关Oracle SCN知识点的整理

    [体系结构]有关Oracle SCN知识点的整理 1  BLOG文档结构图   BLOG_Oracle_lhr_Oracle SCN的一点研究.pdf 2  前言部分 2.1  导读和注意事项 各位技 ...

  6. OLE DB Command transformation 用法

    OLE DB Command transformation component 能够引用参数,逐行调用sqlcommand,This transformation is typically used ...

  7. PDO 用法学习

    PDO: php data object数据库访问抽象层 基于驱动:1.安装扩展 php_pdo.dll2.安装驱动 php_pdo_mysql.dll linux 编译时参数:--with-pdo= ...

  8. sql server中常用方法函数

    SQL SERVER常用函数 1.DATEADD在向指定日期加上一段时间的基础上,返回新的 datetime 值. (1)语法: DATEADD ( datepart , number, date ) ...

  9. mybatis 细粒度控制二级缓存

    本文要解决的问题:细粒度控制mybatis的二级缓存.mybatis的二级缓存的问题:当更新SQL执行时只清除当前SQL所在命名空间(namespace)的缓存.如果存在2个命名空间namespace ...

随机推荐

  1. jquery ajax 发送邮件例子

    <div class="form"> <dl> <dt>您的称呼<small>(必填)</small></dt&g ...

  2. 【MySQL】通过Binary Log简单实现数据回滚(一)

    一.前言 对,没错,我又水了好一阵子,深刻反思寄几.前段时间,工作项目上出于对excel等批量操作可能出现误操作的问题,要求提供一个能够根据操作批次进行数据回滚的能力.在开发的过程中接触到了MySQL ...

  3. C#之FTP上传下载(一)

    搭建FTP服务器 最近要实现这样一个功能:FTP服务器的上传和下载,搜集了一些资料,在c播客上看到昵称为"傻丫头和科技"的作者写的一篇文章写得挺好,有的地方个人觉得不是很详细,自己 ...

  4. [LeetCode] Split Concatenated Strings 分割串联字符串

    Given a list of strings, you could concatenate these strings together into a loop, where for each st ...

  5. [LeetCode] Contiguous Array 邻近数组

    Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. ...

  6. Python系列 - optparse

    我们知道sys.argv[] 可以获得命令行参数 同样,optparse 对此提供了更为强大的功能. import optparse class ArgvHandler(object): def __ ...

  7. AXIOS源代码重点难点分析

    摘要 vue使用axios进行http通讯,类似jquery/ajax的作用,类似angular http的作用,axios功能强大,使用方便,是一个优秀的http软件,本文旨在分享axios源代码重 ...

  8. [AHOI 2009]chess 中国象棋

    Description 题库链接 给你一张 \(N\times M\) 的棋盘.要求每行每列最多放两个棋子,问总方案数. \(1\leq N,M\leq 100\) Solution 记 \(f_{i ...

  9. 计蒜客NOIP模拟赛(2)D1T3 深黑幻想

    [问题描述]    凡终于发愤图强,决定专心搞OI,不再玩纸牌和坑钱了!没过多久就飘飘然了,总是陷入自己进了集训队的深黑幻想之中.    样听说了之后,决定考一考凡欧拉回路怎么写.样:“我给你出一道题 ...

  10. [洛谷]P3613 睡觉困难综合征

    题目大意:给出一棵n个点的树,每个点有一个运算符(与.或.异或)和一个数,支持两种操作,第一种修改一个点的运算符和数,第二种给出x,y,z,询问若有一个0~z之间的数从点x走到点y(简单路径),并且对 ...