Today I ran the query in SSMS and it gave me a hint about the missing index.
But the expression about creating the index confuses me, there is a name Name of Missing Indexthat is clear, but there is also ,sysnamea part of the name that I do not understand.
I get to this https://docs.microsoft.com/en-us/sql/t-sql/statements/create-index-transact-sql , but I just can't find an explanation for this create syntax.
so in part [<Name of Missing Index, sysname,>]you can simply replace Name of Missing Indexand leave the value sysnameor do I need to put something else there?
I use sql server 2014
Here is the result created by SSMS
/*
Missing Index Details from SQLQuery1.sql - SQLSERVER\GTT_192.GTT_Test (sa (70))
The Query Processor estimates that implementing the following index could improve the query cost by 43.2521%.
*/
/*
USE [GTT_Test]
GO
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[tblRitRouteDetail] ([DistanceToll])
INCLUDE ([RitID])
GO
*/
What is the difference if I created the index as follows:
CREATE NONCLUSTERED INDEX IX_RitRouteDetail_DistanceToll
ON dbo.tblRitRouteDetail (DistanceToll)
INCLUDE (RitID)