Direct-path INSERT is subject to a number of restrictions. If any of these restrictions is violated, then Oracle Database executes conventional INSERT serially without returning any message, unless otherwise noted:
直接路径装载有很多限制。如果我们违反了这些限制,那么Oracle会按照正常的insert语句来处理而不会提示任何的信息,除非有其他的错误。
You can have multiple direct-path INSERT statements in a single transaction, with or without other DML statements. However, after one DML statement alters a particular table, partition, or index, no other DML statement in the transaction can access that table, partition, or index.
可以在单独的事务中包括多个直接路径的装载语句或者其他的dml语句。(标红的语句没明白啥意思不知如何翻译)
Queries that access the same table, partition, or index are allowed before the direct-path INSERT statement, but not after it.
可以在直接装载语句前访问相同的表、分区或索引但不能在发布后。
If any serial or parallel statement attempts to access a table that has already been modified by a direct-path INSERT in the same transaction, then the database returns an error and rejects the statement.
不能在相同的事务中通过parallel来访问已经是直接路径装载的表。否则会遭遇:ORA-12838的错误
下例如果没有标红的commit就是这种情况
declare
v_start_pos paysys_item_info.id%type;
begin
insert /*+ append */
into tmp_paysys_item_info
(Item_ID, Item_Type)
select Item_ID, Item_Type from paysys_item_info where id >= 25014008;
commit;
select /*+parallel(t,4)*/
max(item_id)
into v_start_pos
from tmp_paysys_item_info t;
dbms_output.put_line(v_start_pos);
end;
The target table cannot be index organized or part of a cluster.
目标表不是索引组织表或者是集群的一部分(集群也涉及到分布式)。
The target table cannot contain object type columns.
目标表不能包含对象类型。
The target table cannot have any triggers or referential integrity constraints defined on it.
目标表不能有触发器与完整性约束。
The target table cannot be replicated.
目标表不能复制。
A transaction containing a direct-path INSERT statement cannot be or become distributed.