避免数据加载过程中维护索引对性能产生影响,我们可以在加载数据之前使所有失效,加载数据之后再手工重建索引。
Space Considerations with Direct-Path INSERT
Direct-path INSERT requires more space than conventional-path INSERT.
##与传统路径插入相比直接路径插入需要更多的磁盘空间
All serial direct-path INSERT operations, as well as parallel direct-pathINSERT into partitioned tables, insert data above the high-water mark of the affected segment. This requires some additional space.
##不论串行或并行直接路径插入都是直接利用高水位线之上的数据块,这样就需要更多的空间(与传统路径插入相比)
Parallel direct-path INSERT into nonpartitioned tables requires even more space, because it creates a temporary segment for each degree of parallelism. If the nonpartitioned table is not in a locally managed tablespace in automatic segment-space management mode, you can modify the values of the NEXT and PCTINCREASE storage parameter andMINIMUM EXTENT tablespace parameter to provide sufficient (but not excess) storage for the temporary segments. Choose values for these parameters so that:
##
The size of each extent is not too small (no less than 1 MB). This setting affects the total number of extents in the object.
The size of each extent is not so large that the parallel INSERT results in wasted space on segments that are larger than necessary.
After the direct-path INSERT operation is complete, you can reset these parameters to settings more appropriate for serial operations.
Locking Considerations with Direct-Path INSERT
During direct-path INSERT, the database obtains exclusive locks on the table (or on all partitions of a partitioned table). As a result, users cannot perform any concurrent insert, update, or delete operations on the table, and concurrent index creation and build operations are not permitted. Concurrent queries, however, are supported, but the query will return only the information before the insert operation.
##direct-path INSERT操作会对表或者分区表的所有分区加上排他锁。因此在direct-path INSERT过程中不能对目标表进行dml操作,查询是可以的(非direct-pathINSERT当前会话),但查询返回的是direct-path INSERT之前的数据。