Second Attemp...

Occasionally, as I come across interesting Oracle Database related issues, I’ll post my thoughts and opinions and who knows what else and perhaps, just maybe, others may find it interesting or useful as well.

Let the fun begin …


One needs to understand how Oracle works in order to use it safely.

----------------------------------------------------------------------
Jan-2017.

This is my second blogging attempt, I originally created the Oracle Blog to talk about Oracle, my learning and findings in Oracle world.

But as we move on, I started working on Big Data Analytics, DevOps and Cloud Computing. So here is second attempt of blogging on Cloud Computing (AWS, Google Cloud), Big Data technologies , concepts and DevOps tools.

Thursday, July 30, 2009

Copy Huge table..

CREATE OR REPLACE PROCEDURE copy_table
IS
CURSOR emp_cur IS SELECT /*+ PARALLEL (t1)*/ * FROM emp t1;

TYPE fetch_array_type IS TABLE OF emp_cur%ROWTYPE;
t_array fetch_array_type;

BEGIN

EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 4';

OPEN emp_cur ;
LOOP
FETCH emp_cur BULK COLLECT INTO t_array LIMIT 10000;
FORALL i IN 1..t_array.COUNT
INSERT /*+ APPEND */ INTO empl1 VALUES t_array(i) ;
EXIT WHEN emp_cur%NOTFOUND;
COMMIT;
END LOOP;
COMMIT;
CLOSE emp_cur;
END;
/

No comments:

Post a Comment

Amazon AWS Certified !!!

Today I passed the AWS Certified Developer - Associate exam with 92%  Wow, I have been working on AWS since last one year and mainly usin...