UNION ALL slow (cost goes from 75 and 173 to 450,789!)
761812Jun 14 2010 — edited Jun 14 2010Hi,
I have two Selects (lots of joins - big tables)
Select A) has an explain plan cost of 75
Select B) has an explain plan cost of 173
If I union (or union all) the cost goes up to 450,789!
I can paste in the queries, plans etc - but if anyone has any quick ideas that'd be great.
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
What I'd like is to force the optomiser to run each query sequentially - but not really sure how.
Any help would be really appreciated - I have few hairs left and am just about to tear the last one out!
Cheers,
Patrick