Você está na página 1de 1

Hi Tom,

What if the table on the remote database has some 50M of data? The following que
ry will take lot of time depending on the resources available.
insert into local_table select * from table@database_link;
But If i go with the following query its a bit faster,
insert /*+APPEND PARALLEL(local_table,x)*/into local_table select /*+prallel(a,x
)* from
table@database_link a;
but I want to improve that even more. Is it possible? I tried it using the bulk
collect implementaion as follows:
OPEN c1 FOR (SELECT * FROM table@database_link);
LOOP
FETCH c1 BULK COLLECT INTO tab LIMIT 2000;
EXIT WHEN tab.count = 0;
FORALL idx IN 1..tab.count
INSERT INTO local_table
VALUES tab(idx);
END LOOP;
CLOSE c1;

Você também pode gostar