你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle smon_scn_time 表 说明

[日期:2013-03-29] 来源:CSDN  作者:tianlesoftware [字体:大 中 小]

二.SMON_SCN_TIME表记录保存策略说明

2.1 Oracle 9i

根据MOS文档的说明:

How To Map SCN To Timestamp Before 10g? [ID365536.1]

SYS.SMON_SCN_TIMEwill have a maximum of 1440 rows and each record will be for a 5 minute period.Oracle maintains this information for a maximum of 5 days after which therecords will be recycled.

This means thatdata is stored 12 times per hour * 24 hours * 5 days = 1440 rows.

在Oracle 9i版本中,SMON_SCN_TIME 表中最多存放1440条记录。 SMON 进程每隔5分钟生成一次SCN和TIME 之前的映射,并更新到SMON_SCN_TIME表。该表的维护周期是5天。

因此该表最多存放的记录是:12*24*5=1440条记录。

超过1440条的记录在下次循环中会被删除。

2.2 Oracle 10g以后的版本

在oracle 10g以后的版本,SMON_SCN_TIME表的维护策略发生了变化。

根据MOS文档的说明:

High Executions Of Statement "deletefrom smon_scn_time..." [ID 375401.1]

The deletestatement deletes the oldest rows from smon_scn_time to clear space for newrows.  SMON wakes up every 5 minutes and checks how many on-disk mappingswe have--the max is 144000.

--SMON进程每个5分钟唤醒一次来更新SCN和TIME之间的映射关系,并且检查SMON_SCN_TIME表中的记录数,该表的记录数最大是144000条。

The new mappingsare then added for the last period (since SMON last updated), and if this isover 144000, SMON will then issue the delete statement:

delete fromsmon_scn_time where thread=0 and time_mp = (select min(time_mp) fromsmon_scn_time where thread=0)

--SMON进程会把最新的SCN_TIME映射关系写入SMON_SCN_TIME表,如果该表的记录数超过144000条,那么就会执行上面的delete操作,删除最早的记录。

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

--SMON进程每次被唤醒都会更新SMON_SCN_TIME表,如果一次delete操作不能释放足够的空间映射空间,就会执行多次delete操作。

linux
相关资讯       smon_scn_time 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款