楼主: yxyup

[笔记] 为什么再次select还会产生redo?

[复制链接]
论坛徽章:
106
2008新春纪念徽章
日期:2008-02-13 12:43:03ITPUB十周年纪念徽章
日期:2011-11-01 16:21:152012新春纪念徽章
日期:2012-01-04 11:51:222012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25版主4段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:07:31
51#
 楼主| 发表于 2007-2-28 20:59 | 只看该作者
最初由 NinGoo 发布
[B]

我的意思是,看看这些redo的内容究竟是什么,再来反推是什么引起的redo

切换日志是为了防止其他不相关的redo记录太多,无法找到你想要的东西,呵呵 [/B]



好的,我明天到公司按着宁哥说的做一次


谢啦

使用道具 举报

回复
论坛徽章:
15
祖国60周年纪念徽章
日期:2009-10-09 08:28:002009架构师大会纪念徽章
日期:2010-01-18 13:43:21ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28
52#
发表于 2007-2-28 23:06 | 只看该作者
1 有可能是别的事物在产生redo
2 bug

建议反向追踪

使用道具 举报

回复
论坛徽章:
106
2008新春纪念徽章
日期:2008-02-13 12:43:03ITPUB十周年纪念徽章
日期:2011-11-01 16:21:152012新春纪念徽章
日期:2012-01-04 11:51:222012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25版主4段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:07:31
53#
 楼主| 发表于 2007-3-2 10:38 | 只看该作者
今天不忙了,又想起这个问题,再次测试。

步骤如下

[php]

SQL> select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        21        115        608

SQL> select count(*) from temp_trial_3006;

  COUNT(*)
----------
   9651547

SQL> select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        21        115       1544

新开一个session

SQL> shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> SQL>
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 4732717392 bytes
Fixed Size                   743760 bytes
Variable Size             738197504 bytes
Database Buffers         3992977408 bytes
Redo Buffers                 798720 bytes
Database mounted.
Database opened.

回到原来session;

SQL> conn yxy
Enter password:
Connected.
SQL>  select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        15        115       1448

SQL> select count(*) from temp_trial_3006;

  COUNT(*)
----------
   9651547

SQL>  select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        15        115       2384

SQL> select count(*) from temp_trial_3006;

  COUNT(*)
----------
   9651547

SQL> select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        15        115       3320

SQL>  select count(*) from temp_trial_3006;

  COUNT(*)
----------
   9651547

SQL> select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        15        115       4256

SQL> select count(*) from temp_trial_3006;

  COUNT(*)
----------
   9651547

SQL> select * from v$sesstat where sid=(select distinct sid from v$mystat ) and statistic#=(select statistic# from v$statname where name='redo size');

       SID STATISTIC#      VALUE
---------- ---------- ----------
        15        115       5192

SQL>

[/php]

越不越不明白了,重启了DB还是产生固定的redo

使用道具 举报

回复
论坛徽章:
18
ITPUB元老
日期:2005-02-28 12:57:002010年世界杯参赛球队:南非
日期:2010-04-19 12:17:452010新春纪念徽章
日期:2010-03-01 11:05:01生肖徽章2007版:牛
日期:2009-11-02 17:04:55祖国60周年纪念徽章
日期:2009-10-09 08:28:00生肖徽章2007版:兔
日期:2008-09-22 19:33:40奥运会纪念徽章:蹦床
日期:2008-09-09 11:00:24奥运会纪念徽章:跳水
日期:2008-06-16 06:59:25ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-10-08 01:03:42
54#
发表于 2007-3-2 10:42 | 只看该作者
搞清楚10046的第二行到底是什么,就知道为什么有redo了

使用道具 举报

回复
论坛徽章:
106
2008新春纪念徽章
日期:2008-02-13 12:43:03ITPUB十周年纪念徽章
日期:2011-11-01 16:21:152012新春纪念徽章
日期:2012-01-04 11:51:222012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25版主4段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:07:31
55#
 楼主| 发表于 2007-3-2 10:44 | 只看该作者
最初由 oracledba 发布
[B]搞清楚10046的第二行到底是什么,就知道为什么有redo了 [/B]


老兄是说这个

select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=:1

使用道具 举报

回复
论坛徽章:
18
ITPUB元老
日期:2005-02-28 12:57:002010年世界杯参赛球队:南非
日期:2010-04-19 12:17:452010新春纪念徽章
日期:2010-03-01 11:05:01生肖徽章2007版:牛
日期:2009-11-02 17:04:55祖国60周年纪念徽章
日期:2009-10-09 08:28:00生肖徽章2007版:兔
日期:2008-09-22 19:33:40奥运会纪念徽章:蹦床
日期:2008-09-09 11:00:24奥运会纪念徽章:跳水
日期:2008-06-16 06:59:25ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44数据库板块每日发贴之星
日期:2007-10-08 01:03:42
56#
发表于 2007-3-2 10:46 | 只看该作者
是的,你把这个再跑一遍看看是什么东西

使用道具 举报

回复
论坛徽章:
106
2008新春纪念徽章
日期:2008-02-13 12:43:03ITPUB十周年纪念徽章
日期:2011-11-01 16:21:152012新春纪念徽章
日期:2012-01-04 11:51:222012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25版主4段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:07:31
57#
 楼主| 发表于 2007-3-2 11:18 | 只看该作者
最初由 oracledba 发布
[B]是的,你把这个再跑一遍看看是什么东西 [/B]


[php]

SQL> r
  1* select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=20078

    OWNER# NAME                            NAMESPACE REMOTEOWNE LINKNAME   SUBNAME      DATAOBJ#      FLAGS
---------- ------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
        30 TEMP_TRIAL_3006                         1                                       20078          0



____________________________________________
[/php]

使用道具 举报

回复
论坛徽章:
41
ITPUB元老
日期:2007-04-18 10:10:372012新春纪念徽章
日期:2012-02-13 15:09:232012新春纪念徽章
日期:2012-02-13 15:09:232012新春纪念徽章
日期:2012-02-13 15:09:232012新春纪念徽章
日期:2012-02-13 15:09:232012新春纪念徽章
日期:2012-02-13 15:09:23迷宫蛋
日期:2012-05-09 13:09:18双黄蛋
日期:2013-01-21 12:55:59马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
58#
发表于 2007-3-2 11:45 | 只看该作者
我也不解

使用道具 举报

回复
论坛徽章:
59
狮子座
日期:2016-03-26 13:35:402013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-02-25 11:06:15ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20灰彻蛋
日期:2012-04-25 13:19:33紫蛋头
日期:2012-03-14 11:16:09最佳人气徽章
日期:2012-03-13 17:39:18玉石琵琶
日期:2012-02-21 15:04:38鲜花蛋
日期:2011-11-30 14:13:01ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
59#
发表于 2007-3-2 11:54 | 只看该作者
关注!期待高人解惑
吃饭前再顶一个

顺便问一下这张表是不是建在sys下的?

使用道具 举报

回复
论坛徽章:
117
ITPUB元老
日期:2005-02-28 12:57:002012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20版主7段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:42ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:32紫蛋头
日期:2013-03-04 17:00:07优秀写手
日期:2013-12-18 09:29:09
60#
发表于 2007-3-2 12:07 | 只看该作者
你用Logmnr分析一下日志都写了什么就知道,否则再怎么猜都是瞎忙。

使用道具 举报

回复

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

本版积分规则 发表回复

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