楼主: wing hong

In-Memory undo (IMU)

[复制链接]
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
11#
发表于 2005-3-2 11:27 | 只看该作者

Re: Re: Re: In-Memory undo (IMU)

最初由 wing hong 发布
[B]
If we have a cold backup,  I think we can open the database without the undo tablespace ,  but no much else we can do since we cannot  use the system rollback segment for other DML.  

(And if we have hot backup , since the files are fuzzy, we must need to do rollback anyhow)
[/B]


You probably meant "do roll forward" when you said "do rollback".

It's interesting to see your proof (not quoted here) that you *can* open a database without the undo tablespace. I should have tried that. Indeed you can't use system rollback segment for your DML. But can't you create a non-system rollback segment (or undo tablespace)? My goal is to backup a database without undo and create it after you restore, much like Oracle has improved to the point of not needing temporary tablespace in backup.

My guess about IMU being the feature that CR blocks are never written is just a guess. Probably a wrong one. You can ignore it,

Yong Huang

使用道具 举报

回复
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
12#
 楼主| 发表于 2005-3-2 13:30 | 只看该作者

Re: Re: Re: Re: In-Memory undo (IMU)

>> You probably meant "do roll forward" when you said "do rollback".


No. I did mean rolllback. Sorry  I didn't make my self  clear.  what I am trying to say is :

since it is a hot backup, it is quite possible a  dirty block is already in the datafile  but that is part of  a roll back transaction. so in this case when we open a databaes, after we roll forward, then we must roll back. in this case , we must have the undo tablespace intact.




>>>  But can't you create a non-system rollback segment (or undo tablespace)? My goal is to backup a database without undo and create it after you restore, much like Oracle has improved to the point of not needing temporary tablespace in backup.

I think we can create a undo tablespace after this . since the database is already open.
( I kind of remember I did this test before, but I will double check later)
but  this is different with temp tablespace, since it only works with  COLD backup. and since most of the  times,  we have to use hot backup to do the cloning etc, we can't take the  db down.  so the use of this is not much.

使用道具 举报

回复
论坛徽章:
92
2011新春纪念徽章
日期:2011-01-25 15:42:33咸鸭蛋
日期:2012-03-19 10:46:00版主1段
日期:2012-05-15 15:24:11奥运会纪念徽章:排球
日期:2012-08-29 07:02:50奥运会纪念徽章:跳水
日期:2012-09-26 06:44:27ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:42ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:32奥运会纪念徽章:击剑
日期:2012-10-12 07:20:332013年新春福章
日期:2013-02-25 14:51:242012新春纪念徽章
日期:2012-02-13 15:13:20
13#
发表于 2008-11-7 16:59 | 只看该作者
谁的production enable了这个功能?

观察到redo size明显减少了吗?

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
14#
发表于 2008-11-8 02:34 | 只看该作者
原帖由 玉面飞龙 于 2008-11-7 02:59 发表
谁的production enable了这个功能?

观察到redo size明显减少了吗?


You mean, when in-memory undo is enabled, redo size is reduced? I think it's by design. See

http://www.freelists.org/archives/oracle-l/01-2008/msg00000.html

_in_memory_undo is true by default. I haven't checked which other parameter, if any, indirectly sets this parameter.

Yong Huang

使用道具 举报

回复
论坛徽章:
92
2011新春纪念徽章
日期:2011-01-25 15:42:33咸鸭蛋
日期:2012-03-19 10:46:00版主1段
日期:2012-05-15 15:24:11奥运会纪念徽章:排球
日期:2012-08-29 07:02:50奥运会纪念徽章:跳水
日期:2012-09-26 06:44:27ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:42ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:32奥运会纪念徽章:击剑
日期:2012-10-12 07:20:332013年新春福章
日期:2013-02-25 14:51:242012新春纪念徽章
日期:2012-02-13 15:13:20
15#
发表于 2008-11-10 21:36 | 只看该作者
good link.

When enabling  supplemental_log for shareplex , log miner, streams, logical standby etc, it will disable in memory undo automatically.

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
16#
发表于 2008-11-11 03:32 | 只看该作者
原帖由 玉面飞龙 于 2008-11-10 07:36 发表
good link.

When enabling  supplemental_log for shareplex , log miner, streams, logical standby etc, it will disable in memory undo automatically.


I probably misunderstand you. But this shows that in memory undo is still enabled:

SQL> select ksppstvl from x$ksppsv where indx = (select indx from x$ksppi where ksppinm = '_in_memory_undo');

KSPPSTVL
-----------------------------------------
TRUE

SQL> alter database add supplemental log data;

Database altered.

SQL> select ksppstvl from x$ksppsv where indx = (select indx from x$ksppi where ksppinm = '_in_memory_undo');

KSPPSTVL
------------------------------------------
TRUE

I'm running 10.2.0.1 on my laptop.

Yong Huang

使用道具 举报

回复
论坛徽章:
68
2015年新春福章
日期:2015-03-06 11:57:31奥运会纪念徽章:手球
日期:2012-09-13 15:50:49奥运会纪念徽章:水球
日期:2012-08-26 20:46:49版主1段
日期:2012-05-15 15:24:112012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-01-04 11:49:54
17#
发表于 2008-11-11 08:28 | 只看该作者
for stream environment which we need supp. logging, it is true as well

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Nov 10 16:27:43 2008

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

SQL> select ksppstvl from x$ksppsv where indx = (select indx from x$ksppi where ksppinm = '_in_memory_undo');

KSPPSTVL
--------------------------------------------------------------------------------
TRUE

使用道具 举报

回复
论坛徽章:
27
授权会员
日期:2005-10-30 17:05:33管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:36优秀写手
日期:2013-12-18 09:29:13马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
18#
发表于 2008-11-28 15:06 | 只看该作者
I agree with 玉面飞龙. After add supplemental log, the parameter is still true, but actually it is disabled.

SQL> alter database add supplemental log data;

Database altered.

SQL> select n.name, s.value from v$statname n, v$sesstat s
  2  where n.statistic# = s.statistic#
  3  and s.sid = (select sid from v$mystat where rownum = 1)
  4  and n.name in ('IMU Flushes','IMU commits');

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
IMU commits                                                               1
IMU Flushes                                                               1

SQL> update t set owner = 'X' where rownum = 1;

1 row updated.

SQL> commit;

Commit complete.

SQL>  select n.name, s.value from v$statname n, v$sesstat s
  2   where n.statistic# = s.statistic#
  3   and s.sid = (select sid from v$mystat where rownum = 1)
  4   and n.name in ('IMU Flushes','IMU commits');

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
IMU commits                                                               1
IMU Flushes                                                               1

SQL> select ksppstvl from x$ksppsv where indx = (select indx from x$ksppi where ksppinm = '_in_memory_undo');

KSPPSTVL
-----------------------------------------------------------------------------------------------------------------------------------------------
TRUE

SQL> !ora params _in_memory_undo

NAME                                          VALUE                DESCRIPTION
--------------------------------------------- -------------------- ----------------------------------------------------------------------
_in_memory_undo                               TRUE                 Make in memory undo for top level transactions


SQL>  alter database drop supplemental log data;

Database altered.

SQL> update t set owner = 'X' where rownum = 1;

1 row updated.

SQL> commit;

Commit complete.

SQL> select n.name, s.value from v$statname n, v$sesstat s
  2  where n.statistic# = s.statistic#
  3  and s.sid = (select sid from v$mystat where rownum = 1)
  4  and n.name in ('IMU Flushes','IMU commits');

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
IMU commits                                                               2
IMU Flushes                                                               1

[ 本帖最后由 eagle_fan 于 2008-11-28 15:07 编辑 ]

使用道具 举报

回复
论坛徽章:
27
授权会员
日期:2005-10-30 17:05:33管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:36优秀写手
日期:2013-12-18 09:29:13马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
19#
发表于 2008-11-28 17:15 | 只看该作者
原帖由 Yong Huang 于 2008-11-8 02:34 发表


You mean, when in-memory undo is enabled, redo size is reduced? I think it's by design. See

http://www.freelists.org/archives/oracle-l/01-2008/msg00000.html

_in_memory_undo is true by default. I haven't checked which other parameter, if any, indirectly sets this parameter.

Yong Huang


I doubt it. When the IMU notes are aged out, it still needs to write the undo information to UNDO segments. I believe these writes have to be recorded in redo.

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
20#
发表于 2008-11-28 23:37 | 只看该作者
原帖由 eagle_fan 于 2008-11-28 01:06 发表
I agree with 玉面飞龙. After add supplemental log, the parameter is still true, but actually it is disabled.
...


Thanks for the correction. I checked my database, all the stats like 'IMU%' in v$sysstat and also the stats in v$latch for "In memory undo latch". Supplemental logging does in fact turn off IMU. Metalink Note:428167.1 clearly says "turning supplemental logging on disables IMU".

Another feature of the database that turns off IMU is RAC. Craig Shallahamer's paper "All About Oracle’s In-memory undo" talks about it. In RAC, the entry "KTI-UNDO" doesn't even exist in v$sgastat.

Yong Huang

[ 本帖最后由 Yong Huang 于 2008-11-28 09:56 编辑 ]

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表