Home » SQL & PL/SQL » SQL & PL/SQL » Performance Issue with UNION statement
Performance Issue with UNION statement [message #22244] Tue, 01 October 2002 05:28 Go to next message
Mike Oakes
Messages: 25
Registered: December 2000
Junior Member
Hello, I am having some performance issues when calling a view that is using a UNION statement. The tables that are joined together have about 100,000 rows each. The actual view is pretty simple (just joining each table together), but the view is being called from within another sql statement. If I take the union out and just reference 1 table, the performance is very quick. Combined, it is extremely slow.
Are there any system settings or parameters I can look at changing. Or is there anything I can do to tune the query.

Thanks for your help,
Mike Oakes
Re: Performance Issue with UNION statement [message #22245 is a reply to message #22244] Tue, 01 October 2002 05:52 Go to previous message
Mike
Messages: 417
Registered: September 1998
Senior Member
avoid to use UNION. UNION doesnt just make a union but also checks that there are no duplicates.

So, if you have no duplicates or dont care about duplicates use UNION ALL instead.

HTH
Mike
Previous Topic: How do I catch an exception if the procedure I am calling has become invalid??
Next Topic: move column position
Goto Forum:
  


Current Time: Tue May 07 21:58:44 CDT 2024