ITPub博客

首页 > Linux操作系统 > Linux操作系统 > dml操作谁产生的undo最多

dml操作谁产生的undo最多

原创 Linux操作系统 作者:不吹牛能死 时间:2012-11-14 08:25:08 0 删除 编辑
During which DML operation ( Insert,update and delete) which is the most undo and redo generated and why.
Tom said...
it depends :)
all you have to do however is think about what happens during each operation under different conditions - then you can sort of guestimate what will happen.
during an insert - we have to generate undo equivalent to "delete+rowid"
during an update - we have to generate undo equivalent to "update this rowid to have these before image values" (undo = rowid + column before images)
during a delete - we have to generate undo equivalent to "insert at this rowid these values"
so, considering an unindexed table - IN GENERAL, a delete and update will generate the most and an insert the least. IN GENERAL this is true (but not always).
if you add indexes - everything can change. the insert might generate gobs of undo for the index maintenance - the update might not update any indexed columns and hence only generate undo for the table - and the delete might have to maintain all of the indexes generating tons of undo again.
so, it depends on the nature of the data, what you are inserting/updating/deleting..
same for redo. It depends on what is modified...
 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28278387/viewspace-749161/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: trace文件解析
请登录后发表评论 登录
全部评论

注册时间:2012-10-17

  • 博文量
    22
  • 访问量
    28054