- 浏览: 85977 次
- 性别:
- 来自: 北京
最新评论
做DBA几年来,经常遇到项目到了维护期总是修改表的结构,原因很简单,就是随着数据量越来越大,对表的访问越来越慢。
故这次趁着割接,把这些表重新规划下。不过有个同事在进行划分分区表时,偏偏喜欢用状态字段做分区key,原因是每个月需要出报表,统计数据方便。
据我了解:
1)这个状态字段,根据业务变化,要经过从0到1,最终状态是3
2)而且从表的数据在这个状态字段上的分布了解到,最终状态3占到95%的数据
对partition key 进行update会报错,同时也会影响性能。这样的事情,费力不讨好,但是偏偏有人喜好。
I cannot reproduce, works as supposed for me...What version are you on ?
1 create table t (x number, y char(10))
2 partition by range (x) (
3 partition p1 values less than (100),
4 partition p2 values less than (maxvalue)
5* )
test@CENTRAL> /
Table created.
test@CENTRAL> select table_name, row_movement from user_tables where table_name='T';
TABLE_NAME ROW_MOVE
------------------------------ --------
T DISABLED
test@CENTRAL>
test@CENTRAL> insert into t values (10,'a');
1 row created.
test@CENTRAL> commit;
Commit complete.
test@CENTRAL> update t set x = 110 ;
update t set x = 110
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
test@CENTRAL> alter table t enable row movement;
Table altered.
test@CENTRAL> update t set x = 110 ;
1 row updated.
test@CENTRAL> commit;
Commit complete.
test@CENTRAL> alter table t disable row movement;
Table altered.
test@CENTRAL> select table_name, row_movement from user_tables where table_name='T';
TABLE_NAME ROW_MOVE
------------------------------ --------
T DISABLED
test@CENTRAL> update t set x = 10;
update t set x = 10
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
test@CENTRAL>
Stefan
On 5/2/06, hamid alavi <alavihamid@gmail.com> wrote:
List,
I have partition table and I did alter table table_name enable rowmovement, then when I try to Disable row movement still when I update the partition key the record updated means the disable does not work & I can not disable row movement afte enableing it, any idea?
故这次趁着割接,把这些表重新规划下。不过有个同事在进行划分分区表时,偏偏喜欢用状态字段做分区key,原因是每个月需要出报表,统计数据方便。
据我了解:
1)这个状态字段,根据业务变化,要经过从0到1,最终状态是3
2)而且从表的数据在这个状态字段上的分布了解到,最终状态3占到95%的数据
对partition key 进行update会报错,同时也会影响性能。这样的事情,费力不讨好,但是偏偏有人喜好。
I cannot reproduce, works as supposed for me...What version are you on ?
1 create table t (x number, y char(10))
2 partition by range (x) (
3 partition p1 values less than (100),
4 partition p2 values less than (maxvalue)
5* )
test@CENTRAL> /
Table created.
test@CENTRAL> select table_name, row_movement from user_tables where table_name='T';
TABLE_NAME ROW_MOVE
------------------------------ --------
T DISABLED
test@CENTRAL>
test@CENTRAL> insert into t values (10,'a');
1 row created.
test@CENTRAL> commit;
Commit complete.
test@CENTRAL> update t set x = 110 ;
update t set x = 110
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
test@CENTRAL> alter table t enable row movement;
Table altered.
test@CENTRAL> update t set x = 110 ;
1 row updated.
test@CENTRAL> commit;
Commit complete.
test@CENTRAL> alter table t disable row movement;
Table altered.
test@CENTRAL> select table_name, row_movement from user_tables where table_name='T';
TABLE_NAME ROW_MOVE
------------------------------ --------
T DISABLED
test@CENTRAL> update t set x = 10;
update t set x = 10
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
test@CENTRAL>
Stefan
On 5/2/06, hamid alavi <alavihamid@gmail.com> wrote:
List,
I have partition table and I did alter table table_name enable rowmovement, then when I try to Disable row movement still when I update the partition key the record updated means the disable does not work & I can not disable row movement afte enableing it, any idea?
发表评论
-
dbms_output can not put the zero
2011-08-25 09:29 760DECLARE V_INTA NUMBER ... -
what is the difference between object_id and data_object_id?
2011-08-24 09:17 959The object_id is the primary k ... -
oracle EXECUTE IMMEDIATE ora-00911
2011-08-14 10:15 1519I get an error when I try to ex ... -
Will the valid status of index impact dml operation?
2011-08-05 10:34 852DROP TABLE tab01; SELECT * FRO ... -
where can i find the job number of those jobs defined in dba_scheduler_jobs?
2011-08-01 10:41 855Question: Hello, could anybody ... -
Listener HPUX Error: 242: No route to host
2011-05-17 14:55 989现象: 引用LSNRCTL> status Conne ... -
一进程阻塞问题解决
2011-05-12 16:38 4126同事反映,删除一条数据总是没有反应,请求协助解决. 问题非常 ... -
open database with ORA-00704 and ORA-39700
2011-05-06 16:13 29251,Error 1)alter.log Fri May ... -
oracle text index create and use
2011-05-06 13:41 1925一、Install Text Index 1,The ste ... -
offline datafile and offline tablespace
2011-05-04 11:43 25341)offline datafile OFFLINE Spe ... -
oracle three type of block size
2011-04-28 17:35 776Tools: 引用[oracle@node oracle]$ ... -
bbed一(安装)
2011-04-26 14:54 1519bbed ----------------------- bl ... -
Strategies for RAC inter-instance parallelized queries
2011-04-25 14:14 1141I recently had to sit down and ... -
Enable Row Movement in Partitioning and Overhead
2011-04-24 14:03 1566Question 1: Hi, I am partitio ... -
Row Movement in Oracle
2011-04-23 22:23 2002One of the relatively newer fea ... -
ORACLE DSI 介绍
2011-04-19 18:33 882DSI是Data Server Internals的缩写,是O ... -
Oracle / Buffer cache
2011-04-19 17:18 799引用8.7 Tuning the Operating Syst ...
相关推荐
使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查。使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查 使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查
Oracle 11gr2连Oracle 19c 报ORA-28040 ORA-01017解决方法
ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法 ora-00604 错误 解决 方法ora-00604 错误 解决 方法
oracle数据库ora-01152和ora-01110的解决办法
oracle网络配置(listener_ora-sqlnet_ora-tnsnames_ora).mht
Drop goldengate用户时,报ORA-00604 ORA-20782 ORA-06512错误
ORACLE ORA-00132 ORA-00214
oracle启动失败,ORA-00702报错,windows,linux系统下解决办法
客户端进行连接的时候,系统不定期出现ora-12520,ora-12516的连接问题, 问题解决方案建议: 1、增加process和session的连接数。 2、检查连接的应用,是不是有没有释放的连接。 3、将修改参数local_listener中的vip为...
离线误删空间文件导致的ORA-01033及ORA-01145问题的解决办法,在解决ORA-01033的过程中,又出现ORA-01145 * 第 1 行出现错误: ORA-01145: 除非启用了介质恢复, 否则不允许立即脱机 接着的解决步骤
ORA-12541 TNSno listener 的解决方案 ORA-12541 TNSno listener 的解决方案
在运行查询SELECT * FROM V$SESSION 会出现ORA-29275:部分多字节字符的错误,这是什么原因开始我不得其解,网上也没有介绍什么好办法。本文给出答案。
oracle数据库优化之后,报错报错“ora-00838”的处理方法
OGG之ORA-01403案例,包括这个案例所遇到的错误详解,对使用的参数进行了详细的解说
NULL 博文链接:https://rongren.iteye.com/blog/1886071
ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-...
win 8 升级 win 10 后,oracle 11g 无法启动及客户端连接,命令行sqlplus登录,startup 时报 ORA-00119 和 ORA-00132 的错误。 1. sqlplus /nolog 2. conn / as sysdba 3. startup 报错: ORA-00119 和 ORA-00132
ORA-00604: 递归SQL层1出现错误 ORA-03106: 致命的双工通信协议错误 ORA-02063: 紧接着line(源于dblink) 以及 ORA-04052: 在查找远程对象时出错 ORA-00604: 递归SQL层1出现错误 ORA-03120: 双工转换例行程序:整数...
【DATAGUARD】物理dg配置客户端无缝切换 (八.4)--ora-16652 和 ora-16603错误【DATAGUARD】物理dg配置客户端无缝切换 (八.4)--ora-16652 和 ora-16603错误