Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using union in PL/SQL

520105Nov 20 2006 — edited Nov 23 2006
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2006
Added on Nov 20 2006
10 comments
854 views