SQL Server Performance

Why need to do upadate Statistics

Discussion in 'SQL Server 2005 General DBA Questions' started by litu.deb, Aug 13, 2008.

  1. litu.deb Member

    What I understand from differnet BOL ,,,when we run a sql query the query optimizer checks all the possible query plan and take that query which has less cost (%).
    My question is if statistics is not up to date then what would be the affect to optimizer ,can any one give a example how actually statistics is involved with query optimizer..
    Litu Deb
  2. FrankKalis Moderator

    See if this helps: http://www.microsoft.com/technet/prodtechnol/sql/2005/qrystats.mspx
  3. litu.deb Member

    Hi All,
    The above link is really good.As of now i understand 'Statistics are used by the query optimizer to estimate the selectivity of expressions, and thus the size of intermediate and final query results. Good statistics allow the optimizer to accurately assess the cost of different query plans, and choose a high-quality plan.'
    I am still confused: In execution plan how cost is related with statistics.if statistics is not updated properly how optimizer would be affected.
    Please help..
  4. ghemant Moderator

Share This Page