• jayoub (6/26/2016)


    Q: Why is it that when there is only one table in the database there are a few hundred statistics listed (is it because I am also seeing statistics for index views

    Index views could certainly be a part of the problem. There's also a thing known as "Column Statistics" that are created when criteria isn't covered by an index.

    Q: Why are not all indexes updated.

    Because some indexes may be in mixed extents or the system decides that a table is too small to bother with.

    Q: How can we determine what indexes/statistics are part of the tables/columns and what are part of the indexed views.

    That's a bit more difficult but you can start by looking at the sys.indexes table and the sys.stats table (views, really). See "Books Online" for more information on those and related tables, views, DMVs. and system functions.

    Your turn, please. Why on this good green Earth do you have to prove that indexes were rebuilt? Also, what are you doing to keep from blowing out the log files and the MDF file during index rebuilds on larger tables?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)