小编use*_*037的帖子

PL/SQL Append_Values Hint给出错误消息

我无法使用PL/SQL在Oracle表中执行大量插入操作.我的查询逐行进行,对于每一行,查询进行计算以确定需要插入另一个表的行数.传统的插入工作,但代码需要很长时间才能运行大量的行.为了加快插入速度,我尝试使用Append_Values提示,如下例所示:

BEGIN
FOR iter in 1..100 LOOP
INSERT /*+ APPEND_VALUES*/ INTO test_append_value_hint values (iter);
END LOOP;
END;
Run Code Online (Sandbox Code Playgroud)

执行此操作时,我收到以下错误消息:

ORA-12838: cannot read/modify an object after modifying it in parallel
ORA-06512: at line 3
12838. 00000 -  "cannot read/modify an object after modifying it in parallel"
*Cause:    Within the same transaction, an attempt was made to add read or
           modification statements on a table after it had been modified in parallel
           or with direct load. This is not permitted.
*Action: …
Run Code Online (Sandbox Code Playgroud)

oracle plsql ora-06512

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

ora-06512 ×1

oracle ×1

plsql ×1