简体   繁体   English

从 DBLink 批量插入的 Oracle 数据库提示

[英]Oracle database hints for bulk Insert from DBLink

I need to insert around 50 tables that have bulk data in them via DBLink.我需要通过 DBLink 插入大约 50 个包含大量数据的表。 I generally use the statement我一般使用语句

insert into <table_name> 
select * from <table_name>@DBLink

In some cases, it takes too long to insert.在某些情况下,插入时间太长。 What useful database hints can be used in here to speed up the process?这里可以使用哪些有用的数据库提示来加快进程?

You can use ORACLE's APPEND hint您可以使用ORACLE's APPEND提示

The APPEND hint tells the optimizer to perform a direct-path insert, which improves the performance of INSERT .. SELECT operations for a number of reasons: APPEND 提示告诉优化器执行直接路径插入,这提高了 INSERT .. SELECT 操作的性能,原因有很多:

Data is appended to the end of the table, rather than attempting to use existing free space within the table.数据被附加到表的末尾,而不是尝试使用表中现有的可用空间。

Data is written directly to the data files, by-passing the buffer cache.数据直接写入数据文件,绕过缓冲区缓存。

Referential integrity constraints are not considered.不考虑参照完整性约束。 * *

No trigger processing is performed.不执行触发处理。 * *

Syntax:句法:

INSERT /* + APPEND */ INTO YourTable
SELECT * FROM YourTable@DBLink

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM