Index Missing

  • Hi Experts,

    I am facing a problem with my production database. After I have performed a DBCC DBREINDEX , I am getting a error on a table saying that some indexes are missing on some fields.

    Please suggest what should I do.

  • Always remember to create backup before reindexing because this is much possible to happen.

    By the way, following script displays missing indexes in each table, see if this can help:

    select top 10

    round(avg_total_user_cost * avg_user_impact

    * (user_seeks + user_scans), 0) "Total Cost",

    avg_user_impact, statement "Table Name",

    equality_columns "Equality Columns",

    inequality_columns "Inequality Columns",

    included_columns "Include Columns"

    from sys.dm_db_missing_index_groups g

    join sys.dm_db_missing_index_group_stats s

    on s.group_handle = g.index_group_handle

    join sys.dm_db_missing_index_details d

    on d.index_handle = g.index_handle

    order by "Total Cost" desc;

  • Thanks

    But the script is giving error

  • what error? could u send the error statement plz?

    it runs here perfectly! 🙂

  • What's the exact DBCC DBREINDEX command that you're running and what error is it giving you?

    Is this SQL 2005? (I assume it is, seeing as it's posted in the 2005 forum)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

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