May 2, 2012 at 6:31 am
I have a table and ı have an update query and ı look at the execution plan of query SQL SERVER suggest to me use clustered index in index include column is any meaning of these why?
May 2, 2012 at 6:32 am
Can you copy and paste what SQL Server is suggesting into a post here? Would help.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 2, 2012 at 6:38 am
/*
The Query Processor estimates that implementing the following index could improve the query cost by 99.9906%.
*/
/*
USE [DB]
GO
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[TBL] ([STOCKREF],[INVENNO],[DATE_])
INCLUDE ([LOGICALREF])
GO
*/
May 2, 2012 at 6:41 am
ESAT ERKEC (5/2/2012)
/*The Query Processor estimates that implementing the following index could improve the query cost by 99.9906%.
*/
/*
USE [DB]
GO
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[TBL] ([STOCKREF],[INVENNO],[DATE_])
INCLUDE ([LOGICALREF])
GO
*/
SQL Server is suggesting you to add an index, and the you can use the script given to create it
The estimated improvement in performance by adding this index is 99.9906%
Now, its up to you to decide if you want to accept the suggestion or not
Its not mandatory or an error, just a suggestion by SQL Server
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 2, 2012 at 6:44 am
It is oke but LOGICALREF is an clustered index column i can why it is suggest that?
May 2, 2012 at 6:56 am
ESAT ERKEC (5/2/2012)
It is oke but LOGICALREF is an clustered index column i can why it is suggest that?
Why shouldn't it be suggested?
If that include is necessary for the query to use the index, then that include should be explicitly stated.
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
May 2, 2012 at 6:58 am
Oke i will try it...
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply