12
返回列表 发新帖
楼主: d.c.b.a

drop table后将救回数据的原理!

[复制链接]
论坛徽章:
86
ITPUB元老
日期:2005-02-28 12:57:002012新春纪念徽章
日期:2012-01-04 11:49:542012新春纪念徽章
日期: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:20咸鸭蛋
日期:2012-05-08 10:27:19版主8段
日期:2012-05-15 15:24:112013年新春福章
日期:2013-02-25 14:51:24
11#
发表于 2005-1-18 16:57 | 只看该作者
最初由 wing hong 发布
[B]

I have thought of this before, butI still can't figure out why Oracle want to  write the dirty buffers back to file when it drops a table.

why bother to do it since it drops the table anyway. Any idea ?

thanks [/B]



很早前我也思考过这个问题

没什么很明确的结论,我这样想过,假定在drop table 的当时不把 dirty  buffer 写回datafile,则会否带来 buffer 管理的复杂度。

如果由于drop table释放了 extent ,则当其他表扩展需要用到该extent的时候,是否带来了 额外的成本。

oracle 是否认为 ddl 发生的概率比较小,而写出buffer成本相对来说也并不高,但是会带来 其他额外的收益。 如果不写出,在buffer的管理的其他程序中肯定需要额外的判别处理。


我没有一个很好的理由,但是oracle这么做肯定是权衡了很多因素而决定的。至于后来DUL用到了这个特点可以恢复数据,到后来  flashback table 的实现,都不过是恰好利用了oracle的这个特点。

使用道具 举报

回复
论坛徽章:
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-1-18 18:20 | 只看该作者
Thanks biti_rainy. Good to know I am not the only one to be confused by this issue.

使用道具 举报

回复
论坛徽章:
42
ITPUB北京香山2007年会纪念徽章
日期:2007-01-24 14:35:022011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:56管理团队成员
日期:2011-05-07 01:45:08ITPUB十周年纪念徽章
日期:2011-11-01 16:20:282012新春纪念徽章
日期: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
13#
 楼主| 发表于 2005-1-18 18:34 | 只看该作者
drop tablespace时数据可以救回来的,不过很麻烦,就象dul没有系统表空时一样

使用道具 举报

回复
论坛徽章:
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
14#
发表于 2005-1-19 11:06 | 只看该作者
最初由 biti_rainy 发布
[B]


很早前我也思考过这个问题

没什么很明确的结论,我这样想过,假定在drop table 的当时不把 dirty  buffer 写回datafile,则会否带来 buffer 管理的复杂度。

如果由于drop table释放了 extent ,则当其他表扩展需要用到该extent的时候,是否带来了 额外的成本。

oracle 是否认为 ddl 发生的概率比较小,而写出buffer成本相对来说也并不高,但是会带来 其他额外的收益。 如果不写出,在buffer的管理的其他程序中肯定需要额外的判别处理。


我没有一个很好的理由,但是oracle这么做肯定是权衡了很多因素而决定的。至于后来DUL用到了这个特点可以恢复数据,到后来  flashback table 的实现,都不过是恰好利用了oracle的这个特点。 [/B]


I have checked with  Jonathan Lewis on this . still no luck on the exact reason.

below is the email exchange:

This is the reply I got from  Jonathan Lewis.

" I don't have a clue why Oracle does this.
It seems to be a totally unnecessary action.
But that's what happens. "


This is my original question.

> Hi Mr.Lewis,
>
> In your book "Practical Oracle 8i", you mentioned that when Oracle drops a table, it
> will also write out all the dirty buffers of the table to disk.
>
> I am a little bit confused by this, why Oralce bothers to do this ? Could you please
> explain it a little further ?

使用道具 举报

回复

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

本版积分规则 发表回复

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