rksmageri
05-06-2003, 09:06 AM
Hi Gurus,
In many books you can read that an "insert into" statement is much moore effective
than an "for loop" construction. In my case it isn't. I have try the queries below on
both 8.1.7.3 (AIX) and 9.2.0.1.0 (AIX) and get the same result, the for loop is much
moore faster.
insert into test_tab(ag_no,agobj_no)
select ao.ag_no,ao.agobj_no
from ag_obj ao,
agreement a
where a.ag_flag = 'N'
and a.ag_no = ao.ag_no
for rec in (select ao.ag_no,ao.agobj_no
from ag_obj ao,
agreement a
where a.ag_flag = 'N'
and a.ag_no = ao.ag_no
)
loop
insert into test_tab.....;
end loop;
Any suggestions?
Thanks
In many books you can read that an "insert into" statement is much moore effective
than an "for loop" construction. In my case it isn't. I have try the queries below on
both 8.1.7.3 (AIX) and 9.2.0.1.0 (AIX) and get the same result, the for loop is much
moore faster.
insert into test_tab(ag_no,agobj_no)
select ao.ag_no,ao.agobj_no
from ag_obj ao,
agreement a
where a.ag_flag = 'N'
and a.ag_no = ao.ag_no
for rec in (select ao.ag_no,ao.agobj_no
from ag_obj ao,
agreement a
where a.ag_flag = 'N'
and a.ag_no = ao.ag_no
)
loop
insert into test_tab.....;
end loop;
Any suggestions?
Thanks