using union in PL/SQL
520105Nov 20 2006 — edited Nov 23 2006Hi I have this cursor declaration:
cursor curs
is
select field1,field2,field3 from table_1
Union
select field1,field2,field3 from table_2
Then I loop through the cursor. For some reason this takes enormous amount of time. We are talking about 117000 records.
But If I get rid of the union and just do the following:
cursor curs
is
select field1,field2,field3 from table_1
which gets 115000 records only 2000 records less, i loop through and no problem , it takes reasonable time.
Does anyone know if there is a particular performance issue with UINION in PL/SQL.
Please note that table_1 is a partitioned table.
Thanks