Plan changed following reboot
We have a query that runs nightly and joins four external tables and typical runs in less than 10 minutes. The source data gets loaded every night and never changes significantly either quantitatively or qualitativly. Last Saturday the system was rebooted and statistics were run on the entire db following reboot. The query in question degraded significantly and upon investigation we noticed it was using a different explain which grabs the data using a sort-merge join instead of a hash join. We reran stats on that schema and voila the plan changed back to a hash join which ran in