Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004

    Unanswered: Stats Update - SQL Server 2008


    How do i update the stats of tables when we insert data into it. I believe Auto stats update happens only when 500+ 20% of the rows are changed for a table.

    Once we insert say some 1000 records in to a particular table the query time takes too long (more than 1 min). The same query executes faster once i manually update the stats.

    Best Regards

  2. #2
    Join Date
    Nov 2002
    That's not a lot of data to have to redo the stats

    We recommend not updating statistics too frequently because there is a performance tradeoff between improving query plans and the time it takes to recompile queries


    I'd say something else is wrong

    What are you running that is taking so long?

    And what does "long" mean to you?

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Oct 2004
    We have an JAVA web application in which the business process requirement is to Create a Case (Adding Some Records to Tables) and then Case Execution which will run queries on tables where the records were inserted for analysis.

    The execution time takes more than 4 minutes after the case creation. Once i update the stats, the same case execution time comes down to less than 1 minute.
    Last edited by edwin_fredrick; 02-21-12 at 02:28.

  4. #4
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    hmmmmmmm, the perf improvement on the second run could be the result of the data already beng in the cache.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts