Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 272689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:20:43+00:00 2026-05-12T00:20:43+00:00

When I run SQL Server 2005 Database Tuning Advisor, it gives a recommendation to

  • 0

When I run SQL Server 2005 Database Tuning Advisor, it gives a recommendation to create an index, but it will recommends to index a column which already has an index on it. Why does it give a recommendation to create the same index again?

Here is my SQL:

SELECT t.name AS 'affected_table'
  , 'Create NonClustered Index IX_' + t.name + '_' 
   + CAST(ddmid.index_handle AS VARCHAR(10))
   + ' On ' + ddmid.STATEMENT 
   + ' (' + IsNull(ddmid.equality_columns,'') 
   + CASE 
     WHEN ddmid.equality_columns IS NOT NULL 
          AND ddmid.inequality_columns IS NOT NULL
     THEN ',' 
     ELSE '' 
     END 
   + ISNULL(ddmid.inequality_columns, '')
   + ')' 
   + ISNULL(' Include (' + ddmid.included_columns + ');', ';') 
  AS sql_statement
  , ddmigs.user_seeks
  , ddmigs.user_scans
  , CAST((ddmigs.user_seeks + ddmigs.user_scans) 
    * ddmigs.avg_user_impact AS INT) AS 'est_impact'
  , ddmigs.last_user_seek
FROM 
  sys.dm_db_missing_index_groups AS ddmig
  INNER JOIN sys.dm_db_missing_index_group_stats AS ddmigs
    ON ddmigs.group_handle = ddmig.index_group_handle
  INNER JOIN sys.dm_db_missing_index_details AS ddmid 
    ON ddmig.index_handle = ddmid.index_handle
  INNER Join sys.tables AS t
    ON ddmid.OBJECT_ID = t.OBJECT_ID
WHERE 
  ddmid.database_id = DB_ID()
  AND CAST((ddmigs.user_seeks + ddmigs.user_scans) 
  * ddmigs.avg_user_impact AS INT) > 100
ORDER BY 
  CAST((ddmigs.user_seeks + ddmigs.user_scans) 
  * ddmigs.avg_user_impact AS INT) DESC;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:20:43+00:00Added an answer on May 12, 2026 at 12:20 am

    Perhaps try “DESC” to order a different way?

    This worked in another similar SO question… Why does SQL Server 2005 Dynamic Management View report a missing index when it is not?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 191k
  • Answers 191k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer One thing to realize is that 'value-initialization' is new with… May 12, 2026 at 6:05 pm
  • Editorial Team
    Editorial Team added an answer If it's really an identity column, then it's guaranteed to… May 12, 2026 at 6:05 pm
  • Editorial Team
    Editorial Team added an answer document.write() will only work while the page is being originally… May 12, 2026 at 6:05 pm

Related Questions

I need to pull some BLOB data from a SQL Server 2005 database and
I use NHibernate in my ASP.NET application to connect to an MS SQL Server
I'm trying to get a stored procedure to work for a co-worker who is
I'm creating a log shipping configuration between two sql server 2005 instances. I'm shipping

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.