Thursday, October 25, 2012

When should the statistics be collected?

We should collect statistics on following cases..
  • When statistics are stale, you can help stats on table to find last stats collection date.
  • On all Non-Unique indices· 
  • On Non-index join columns·
  • On  Primary Index of small tables· 
  • On Primary Index of a Join Index·
  •  On Secondary Indices defined on any join index· 
  • When Join index columns that frequently appear on any additional join index columns that frequently appear in WHERE search conditions· 
  • On Columns that frequently appear in WHERE search conditions or in the ON clause of joins

No comments:

Post a Comment