Updating Statistics

  • Comments posted to this topic are about the item Updating Statistics

  • Enjoyed the question, thanks.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

  • UPDATE STATISTICS + sp_updatestats = 2 statements!

    ๐Ÿ™‚

  • Good question, thanks. They may be different statements, but a single statement can accomplish any of them.

  • nice question. thanks for sharing

  • Richard Warr (3/14/2014)


    Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

    +1

    Didn't get the intent of the question, so I choose database level.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (3/14/2014)


    Richard Warr (3/14/2014)


    Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

    +1

    Didn't get the intent of the question, so I choose database level.

    Yup. Same here. :ermm:

  • OCTom (3/14/2014)


    Koen Verbeeck (3/14/2014)


    Richard Warr (3/14/2014)


    Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

    +1

    Didn't get the intent of the question, so I choose database level.

    Yup. Same here. :ermm:

    Arrrgggh.... me too. :crazy:

    I have to stop answering these first thing in the morning. :ermm:

  • sestell1 (3/14/2014)


    OCTom (3/14/2014)


    Koen Verbeeck (3/14/2014)


    Richard Warr (3/14/2014)


    Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

    +1

    Didn't get the intent of the question, so I choose database level.

    Yup. Same here. :ermm:

    Arrrgggh.... me too. :crazy:

    I have to stop answering these first thing in the morning. :ermm:

    Almost happened to me and then I second guessed myself. Thanks for the question Steve.



    Everything is awesome!

  • Well, it depends:

    sp_updatestats updates only the statistics that require updating based on the rowmodctr information in the sys.sysindexes catalog view, thus avoiding unnecessary updates of statistics on unchanged rows.

    That is, if the rowmodctr is too low, the statistics is not updated.

    Anyway, if you experience problem with statistics, you should try to add the traceflags in SQL Server 2008R2 (sp2) or later:

    2371, Changes the threashold for auto update stats for large tables

    2389, Changes the behaviour of known incrementing columns like IDENTITY

    2390, Changes the behaviour of columns with incrementing values like a datetime column with incrementing values.

    (Or wait 'til SQL server 2014)

    /Hรฅkan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

  • Nice question, I had forgotten that sp_updatestats existed so I got it wrong. Maybe now I'll remember ๐Ÿ˜‰

    Tom

  • nice explanation steve.

    thanks.

  • sestell1 (3/14/2014)


    OCTom (3/14/2014)


    Koen Verbeeck (3/14/2014)


    Richard Warr (3/14/2014)


    Stewart "Arturius" Campbell (3/14/2014)


    Interesting question, thanks Steve.

    Misread the question, thought it meant the highest level that a single command can be used...

    ah well...

    Same here :doze:

    +1

    Didn't get the intent of the question, so I choose database level.

    Yup. Same here. :ermm:

    Arrrgggh.... me too. :crazy:

    I have to stop answering these first thing in the morning. :ermm:

    - 1 :w00t:

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic. Login to reply