locked
Statistics RRS feed

  • Question

  • Hi

    Could some one please tell me how to check Database Statistics are optimized for Performance or not. My understanding is if the Actual row count and estimated  row count varies dramatically on the execution plan, then something wrong with the stats,  Please see the image bellow.. 

    Tuesday, August 9, 2011 4:23 PM

Answers

  • While your estimate is correct but I have seen that even if we update the stats or rebuild the index( which updates the stats as well ) there is still a difference many a times which might reduce but does not totally go away ..
    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/
    • Proposed as answer by Peja Tao Thursday, August 11, 2011 7:31 AM
    • Marked as answer by SimpleSQL Wednesday, October 26, 2011 7:36 PM
    Tuesday, August 9, 2011 5:07 PM
  • Thanks..

     

    Yes we do. Any index that are fragmented more than 13% we rebuild other get reorganised on every Sunday. And every Wednesday we reorganise.

    I also issued Update Stas with FULLSCAN on all the table that are part of this code. 

    But still getting this record count difference... 

    • Marked as answer by SimpleSQL Wednesday, October 26, 2011 7:36 PM
    Wednesday, August 10, 2011 9:15 AM

All replies

  • While your estimate is correct but I have seen that even if we update the stats or rebuild the index( which updates the stats as well ) there is still a difference many a times which might reduce but does not totally go away ..
    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/
    • Proposed as answer by Peja Tao Thursday, August 11, 2011 7:31 AM
    • Marked as answer by SimpleSQL Wednesday, October 26, 2011 7:36 PM
    Tuesday, August 9, 2011 5:07 PM
  • Are you updating your statistics on a regular basis or through a maintenance plan?  

     

    There are some good queries you may find useful here to help get information about SQL Server statistics.

    http://bit.ly/n44RhY

    Tuesday, August 9, 2011 6:04 PM
  • Thanks..

     

    Yes we do. Any index that are fragmented more than 13% we rebuild other get reorganised on every Sunday. And every Wednesday we reorganise.

    I also issued Update Stas with FULLSCAN on all the table that are part of this code. 

    But still getting this record count difference... 

    • Marked as answer by SimpleSQL Wednesday, October 26, 2011 7:36 PM
    Wednesday, August 10, 2011 9:15 AM
  • Thanks..

     

    Yes we do. Any index that are fragmented more than 13% we rebuild other get reorganised on every Sunday. And every Wednesday we reorganise.

    I also issued Update Stas with FULLSCAN on all the table that are part of this code. 

    But still getting this record count difference... 


    Yes ,and that won't go I think ...
    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/
    Wednesday, August 10, 2011 10:40 AM