Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Execution Plan suggesting columns include PK

Author  Topic 

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2013-10-04 : 09:53:33
I was looking at the execution plans of a few queries.

SQL Server was suggesting missing indexes. The indexes made sense but everything included the Clustered PK:
     create nonclusted index xxx on table1 (column1) Include (ID)


I believe there is no point to the Include (ID) part. Why does SQL Server do this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-04 : 10:20:53
I dont think it makes much sense either. Dunno the reason why its doing it though.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -