关于ROW MOVEMENT

本文详细介绍了Oracle数据库中RowMovement的概念及其实现方式,包括如何启用、内部工作原理、对性能的影响等常见问题,并列举了相关错误及其解决办法。
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

这段HTML代码的作用是创建一个**表单输入行**,用于显示"姓名"标签和对应的文本输入框。以下是详细分析: ### 代码结构 ```html <td class="left">姓名:</td> <td><input type="text" class="right"></td>     ``` ### 核心功能 1. **表格单元格布局** - 使用`<td>`标签创建表格单元格,通常嵌套在`<tr>`行内 - 第一个单元格显示标签"姓名:" - 第二个单元格包含文本输入框 2. **样式控制** - `class="left"`:可能用于控制标签对齐方式(如右对齐) - `class="right"`:可能用于控制输入框样式(如宽度、边距) 3. **输入框** - `<input type="text">`:创建单行文本输入框 - 当前缺少`name`属性(表单提交时无法识别该字段) ### 潜在问题 1. **非语义化空格** - `    `使用硬空格进行间距控制,应改用CSS margin/padding 2. **可访问性问题** - 缺少`<label>`关联(屏幕阅读器无法识别输入框用途) - 建议改为: ```html <label for="name-input">姓名:</label> <input id="name-input" type="text"> ``` 3. **表单功能不完整** - 缺少`name`属性(表单提交时无法获取值) - 缺少`form`上下文(不确定是否在表单内) ### 改进建议 #### 方案1:标准表格布局 ```html <tr> <td><label for="name">姓名:</label></td> <td><input type="text" id="name" name="username" class="form-input"></td> </tr> ``` #### 方案2:现代CSS布局(推荐) ```html <div class="form-row"> <label for="name" class="form-label">姓名:</label> <input type="text" id="name" name="username" class="form-input"> </div> ``` ### 技术要点说明 1. **表格布局的适用场景** - 适合传统表单布局 - 现代开发更推荐使用CSS Grid/Flexbox 2. **输入框关键属性** - `name`:表单提交时的字段名(必需) - `id`:用于关联`<label>`(提升可访问性) - `placeholder`:可添加提示文本(如"请输入真实姓名") 3. **样式控制建议** - 使用CSS类替代` `: ```css .form-row { display: flex; gap: 16px; /* 替代空格实体 */ margin-bottom: 12px; } .form-label { width: 80px; text-align: right; } ``` ### 完整示例 ```html <form> <div class="form-row"> <label for="username" class="form-label">姓名:</label> <input type="text" id="username" name="username" class="form-input" placeholder="请输入姓名"> </div> <!-- 其他表单字段 --> </form> ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值