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!

Union taking long time

636775Nov 16 2009 — edited Nov 16 2009
I want rows which have ps.ps_node_type != '261' and rows (ps.ps_node_type = '261' AND ps.feature_type !=0 )

I put both the conditions in 2 queries and did a union on it.
like this :
select ...
from ..
where ps.ps_node_type != '261'
union
select ...
from ..
where (ps.ps_node_type = '261' AND ps.feature_type !=0 )

But now its taking 6 to 9 mins to run. and eventually I have to do count() on the columns, which just hangs.

how can I consolidate the condition so that i do not have to use union ?

thanks for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2009
Added on Nov 16 2009
8 comments
755 views