楼主: liyongdong

REDO日志的基本结构

[复制链接]
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
31#
发表于 2006-8-6 16:22 | 只看该作者
谢谢

使用道具 举报

回复
论坛徽章:
0
32#
发表于 2006-8-31 21:35 | 只看该作者
redo是oracle比较特殊的一部份,在关备份方面的深入原理不知道有没有?

使用道具 举报

回复
论坛徽章:
16
ITPUB元老
日期:2006-08-12 12:42:51授权会员
日期:2006-08-12 12:36:09数据库板块每日发贴之星
日期:2006-11-19 01:03:11数据库板块每日发贴之星
日期:2007-04-23 01:05:28会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44BLOG每日发帖之星
日期:2008-06-29 01:02:22
33#
发表于 2006-9-6 22:15 | 只看该作者
可以用:
alter system dump logfile '';
分析redo日志的内容

使用道具 举报

回复
论坛徽章:
0
34#
发表于 2006-9-8 17:10 | 只看该作者

可以用:

alter system dump logfile

使用道具 举报

回复
论坛徽章:
0
35#
发表于 2006-9-8 18:13 | 只看该作者
好文章,顶了

使用道具 举报

回复
论坛徽章:
0
36#
发表于 2006-12-10 04:42 | 只看该作者
最初由 Yong Huang 发布
[B]I'm afraid I have to clarify something you wrote. A server process *is* what Oracle articles sometimes call foreground process, as distinct from a background process (v$bgprocess). But you may already agree with this.

You seem to keep saying before image of a data block is written to log buffer (and eventually redo logfiles). That's not true. As I said, redo records only record changes, no before image, which is what rollback or undo does.

"在频繁执行Update操作的情况下,LGWR会满负荷运行" should be qualified to be "在频繁执行DML操作的情况下 *and* with frequent commits,..." Without commits, LGWR doesn't work that hard. It's true that without commits, server processes still write redo records into log buffer. But LGWR only works when log buffer is 1/3 full (the 3 second rule still applies but it's unrelated to frequent DMLs).

A change vector does not contain before image. It does have block DBA, as well as block version number and op code.

By "在编写程序的时候要集中transaction再进行处理", you mean commit only if absolutely necessary? That's good advice because you want to avoid too many log file sync waits, one common problem in OLTP databases. However, regardless how frequently you commit, the amount of redo is about the same and is dependent on your business logic.

Generally, update generates the most *undo*, insert the least, delete in the middle unless it's a long row. (But you can create cases this general rule doesn't apply.) It's an interesting question which one of the three generates the most or least *redo*. I think since the accompanied undo for these DMLs also generates redo, the total amount of redo follows the same order (i.e. update > delete > insert). Anyway, I don't follow your logic that "UPDATE、INSERT、DELETE对REDO日志文件写入的信息量并没有太大的差异" based on logfile block size being 512.

Yong Huang [/B]


Can you please provide more information about change vector?  Which is the correct explanation?

使用道具 举报

回复
论坛徽章:
0
37#
发表于 2006-12-10 04:54 | 只看该作者
最初由 liyongdong 发布
[B]上次我们说明了REDO日志的基本处理流程,这次将详细介绍其中的LGWR进程,该进程执行REDO日志文件写入处理。

LGWR 将来自log Buffer的commit/rollback信息写入到REDO 日志文件,这些信息用于在数据库发生故障时恢复数据库。在频繁执行Update操作的情况下,LGWR会满负荷运行。这时, REDO日志文件写入操作的I/O性能就成为影响响应速度的关键因素。

LGWR操作在下列时间点会发生:
1. 距上次的写入达到3秒
2. 事务被提交(commit)
3. REDO日志缓冲区使用量达到3分之1的时候
4. DBWR要往数据文件执行写回动作之前
5. 出现checkpoint的时候 [/B]


3. REDO日志缓冲区使用量达到3分之1的时候  or  contains 1MB of buffered data

使用道具 举报

回复
论坛徽章:
0
38#
发表于 2008-4-26 19:24 | 只看该作者
学习

使用道具 举报

回复
论坛徽章:
14
奥运会纪念徽章:拳击
日期:2008-04-24 10:00:15CTO参与奖
日期:2009-02-12 11:45:482012新春纪念徽章
日期:2012-02-07 09:59:35ITPUB季度 技术新星
日期:2012-02-16 14:53:16鲜花蛋
日期:2012-03-19 18:10:462013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11
39#
发表于 2008-4-27 09:37 | 只看该作者
学习

使用道具 举报

回复
论坛徽章:
1
ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
40#
发表于 2008-5-29 16:01 | 只看该作者
很棒!!

楼主什么时候整理一下?:)

使用道具 举报

回复

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

本版积分规则 发表回复

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