locked
UPDATE STATISTICS for a single table? RRS feed

  • Question

  • can we UPDATE STATISTICS for a specific table in a database?
    Monday, January 27, 2014 7:24 PM

Answers

  • yep you can

    use code like below

    UPDATE STATISTICS YourTableName;

    also see

    http://technet.microsoft.com/en-us/library/ms187348.aspx


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


    • Edited by Visakh16MVP Monday, January 27, 2014 7:25 PM
    • Marked as answer by DataNerdE Monday, January 27, 2014 7:30 PM
    Monday, January 27, 2014 7:25 PM
  • can we UPDATE STATISTICS for a specific table in a database?

    Hello,

    Yes you can do it.See below link for details

    USE AdventureWorks2012;
    GO
    UPDATE STATISTICS Sales.SalesOrderDetail;
    GO

    http://technet.microsoft.com/en-us/library/ms187348.aspx


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    • Marked as answer by DataNerdE Monday, January 27, 2014 7:30 PM
    Monday, January 27, 2014 7:26 PM
    Answerer

All replies

  • yep you can

    use code like below

    UPDATE STATISTICS YourTableName;

    also see

    http://technet.microsoft.com/en-us/library/ms187348.aspx


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


    • Edited by Visakh16MVP Monday, January 27, 2014 7:25 PM
    • Marked as answer by DataNerdE Monday, January 27, 2014 7:30 PM
    Monday, January 27, 2014 7:25 PM
  • can we UPDATE STATISTICS for a specific table in a database?

    Hello,

    Yes you can do it.See below link for details

    USE AdventureWorks2012;
    GO
    UPDATE STATISTICS Sales.SalesOrderDetail;
    GO

    http://technet.microsoft.com/en-us/library/ms187348.aspx


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    • Marked as answer by DataNerdE Monday, January 27, 2014 7:30 PM
    Monday, January 27, 2014 7:26 PM
    Answerer