Because this procedure will insert over 1 mil. records and my temp tablespace is very limited. I let the procedure to run and after 5 hours I got the following error(Error): ORA-30036: unable to extend segment by 1024 in undo tablespace 'UNDOTBS1'.