关于ROW MOVEMENT

To BottomTo Bottom

21-Jan-2013FAQ
Rate this document
Email link to this documentOpen document in new windowPrintable Page

In this Document

Purpose
Questions and Answers
  1. What is Row Movement?
  2. How to enable row movement?
  3. Concepts / how it works internally?
  4. Is it only for partitioned tables?
  5. Does it invalidate index?
  6. Does it create row chaining?
  7. Does it have impact on performance?
  8. What are restrictions associated with "Enable Row Movement"?
  9. Related Errors
References

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.6.0 and later
Information in this document applies to any platform.

Purpose

This FAQ documents answers some of the common questions and problems in Row Movements.

Questions and Answers

1. What is Row Movement?

The row movement lets you specify whether the database can move a table row. It is possible for a row to move, for example, during table compression or an update operation on partitioned data.
For more information, have a look at: row_movement_clause

2. How to enable row movement?

Use the option below with ALTER TABLE statement
{ ENABLE | DISABLE } ROW MOVEMENT

Default value is disable. For complete syntax, go to "ALTER TABLE" in Oracle Database SQL Language Reference (11.2)

3. Concepts / how it works internally?

When enable row movement was not set a rowid was assigned when you inserted a row and that never changed. After row movement is enabled a simple update could change your rowid.
When you "Enable Row Movement", you are just giving "Permission" to move a row.
You do not need to delete and insert, you just update the row, and that causes delete and insert, and in turn changes the ROWID.
So, delete and insert is the implicit operation which happens in the background.
Row movement is enabled at the table level, and is disabled by default.

4. Is it only for partitioned tables?

No, Row Movement is associated with partitioned as well as non-partitioned tables.
It is allowed for non-partitioned tables starting 9.2. It comes in to affect for non-partitioned tables when operations like table compression is performed.

5. Does it invalidate index?

No, it does not invalidate indexes

6. Does it create row chaining?

Row Movement will not cause Row Chaining. If the row doesn’t fit into a single data block, it must be chained. Row Chaining basically is the distribution of a single table row across multiple data blocks.
Row Movement is different as it updates the corresponding indexes—the ROWID actually changes. This has benefits on the long run, because the additional block read can be avoided in the TABLE ACCESS BY INDEX ROWID operation.

7. Does it have impact on performance?

Yes, it can cause performance problem as it can cause Oracle to move rows to discontinuous data blocks.
There could be some performance impact as it will necessarily consume processing resources on your machine while running.
The reason being it will:
        - read the table
        - delete/insert the rows at the bottom of the table to move them up
        - generate redo
        - generate undo

8. What are restrictions associated with "Enable Row Movement"?

You cannot specify this clause for a nonpartitioned index-organized table.
Tables need to be in an ASSM (Automatic Segment Space Management) tablespace for this to work.

9. Related Errors

ORA-14402: updating partition key column would cause a partition change
You get this error during UPDATE of a row if row movement is not enabled on the partitioned table, and the row with the new partitioned key value would need to be placed into a a different partition compared where the row before update is. See Document 236191.1 for more details.

ORA-10636: ROW MOVEMENT is not enabled
Document 1132163.1 What is the Meaning of SHRINK SPACE CHECK?

ORA-08189: cannot flashback the table because row movement is not enabled
Document 270060.1 Use Flashback Table Feature and Resolve errors
 Document 287698.1 OERR: ORA-8189 cannot flashback the table because row movement is not enabled

ORA-29887: cannot support row movement if domain index defined on table
Look at the documentation e.g. for 11.2


ORA-14661: row movement must be enabled
Look at the documentation e.g. for 11.2


ORA-14662: row movement cannot be enabled
Look at the documentation e.g. for 11.2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值