Update Statistics

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

    Thanks

  • Thanks for the question, good one.

    M&M

  • Nice question, thanks.

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

  • Straigthforward question, but answers show it's not a straightforward answer!

    Thanks.

  • Good question

    Thanks

  • I had to think for a minute on this one. Got it right, though. Good question.

    http://brittcluff.blogspot.com/

  • Had to think about it...got it wrong....learned something. Thanks.

  • Thanks

    Thanks

  • forsqlserver (7/6/2011)


    If u really give thanks to me I have a problem is that due to good performance I have got the work of SSAS,BI etc. and after 2 months I have to do the installations of Datawarehouse.I have not the time to learn also not getting good link to start datawarehouses.

    What is the concept of Dataware house and all?

    In MSDN also I am continuos seraching I am not getting good start.

    PLS HELP

    Start a new thread and post the link here. This is not the place for such a long discussion.

  • Another good and clear question.

    One that needed to be posted by looking at the answer scores.

    Keep it up thank you.

  • I've got it right. Yay! 😀

    Easy to read and not too long to confuse.

    The first two answers had me thinking for a while though but "query statistics" is supposed to mean only for individual queries, right?

    Thank you for the question.

    Best regards,

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • Got this wrong but... found in BOL 2005 the following remarks.

    Updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view.

    Usually an index is being updated if there is one as well as other information about the table. I do agree that it is assisting the query optimizer. So the answer is a bit shallow because in reality if you run say sp_updatestats and an index needs updating you will see that occur. The end result is the the query optimizer can use this information to perform best.

    Thanks!

    Chad E. Downey, CDMP - Certified Data Management Professional
    Consultant - SQL Server, SSIS, SSRS, SSAS

  • Chad Downey (7/6/2011)


    Got this wrong but... found in BOL 2005 the following remarks.

    Updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view.

    Usually an index is being updated if there is one as well as other information about the table. I do agree that it is assisting the query optimizer. So the answer is a bit shallow because in reality if you run say sp_updatestats and an index needs updating you will see that occur. The end result is the the query optimizer can use this information to perform best.

    Thanks!

    How does statistics update index or tables?

    I wasn't aware of that. I though only the statistics were changed

    not the structure of the index or table.

    Could you show an example of that happening?

    This is what I understand about statistics:

    Statistics for query optimization are objects that contain statistical information about the distribution of values in one or more columns of a table or indexed view. The query optimizer uses these statistics to estimate the cardinality, or number of rows, in the query result. These cardinality estimates enable the query optimizer to create a high-quality query plan. For example, the query optimizer could use cardinality estimates to choose the index seek operator instead of the more resource-intensive index scan operator, and in doing so improve query performance.

    Each statistics object is created on a list of one or more table columns and includes a histogram displaying the distribution of values in the first column. Statistics objects on multiple columns also store statistical information about the correlation of values among the columns. These correlation statistics, or densities, are derived from the number of distinct rows of column values. For more information about statistics objects, see DBCC SHOW_STATISTICS (Transact-SQL).

    Thanks.

    Best regards,

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • Chad Downey (7/6/2011)


    So the answer is a bit shallow because in reality if you run say sp_updatestats and an index needs updating you will see that occur. The end result is the the query optimizer can use this information to perform best.

    Although what you say is true in reality this question was not about what happens when you run sp_updatestats. It was about what happens when you use "Update Statistics".

    So in reality you are confused and you are being shallow expecting the answer for a question to fit your misunderstanding of what it that question was.

    If you still are in question about your confusion, go to MSDN and search on "Update Statistics" and not sp_updatestats.

  • Thanks for the question. I almost got it wrong by selecting to quickly and not thinking through it. When I first learned about statistics I had the wrong idea about what they are, I sometimes fall back on my false initial notion.

    ---------------------------------------------------------------------
    Use Full Links:
    KB Article from Microsoft on how to ask a question on a Forum

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

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