I have a long query generated from Microstrategy with lots of joins which was running our of spool space. I checked the query and confirmed that we had stats collected on all the join columns and stats were current. Then there was one column on which I dropped stats, it had both single and multi column stats after which the query started to run fine. Based off this I have the below questions :-
a. Why does the optimizer generate a better plan without stats than with stats?
b. Can stats like above be an issue or I am missing a warning for some other issue?
c. Are there scenarios where random amp sampling would give a better explain than explain with Stats.
Forums: