I have got a task to insert a large amount of data into tables
These are the work tables into which i have to insert the data by joining multiple tables. I am able to do so with normal sql statements by joining (left, right etc)
2 - 3 tables and then inserting the subsequent result into my 2 work tables.One such example is something like:

insert into wrk_table( col1, col2, col3)
select t1.s1, t2.s2 ,t3.s3
from table1 t1
right outer join table2 t2 on t1.c1=t2.c2
left outer join table3 t3 on t2.c3= t3.c3
where ........
and ................

this operation inserts around 8-10 million records.

I am being asked to to create a function instead of normal sql statements so that performance increases. now my question is how i can achieve this so that data is processed in chunks and will increase performance and less load on the CPU usage.
If i just enclose these SQL statements in a function block, its not going to help. Please let me know a method to achieve this ...