Union taking long time
636775Nov 16 2009 — edited Nov 16 2009I 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.