Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

When does Dropping Stats help - forum topic by cnaveen05

$
0
0

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: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>