How to get rid of Sort Cost ?

How to get rid of Sort Cost ?

Place the name of the column you use with order by at the end of the index.

Query :

select ExceptionMessage, CreateDate from TableName
where MethodName = 'ERROR'
order by TerminalNo

First index :

CREATE NONCLUSTERED INDEX [IX_TableName_MethodName] ON 
[dbo].[TableName] ([MethodName])
INCLUDE (TerminalNo, ExceptionMessage,  CreateDate) -- the columns that used by select statement
WITH (DROP_EXISTING = ON, ONLINE = On)
GO

First Execution Plan :

Second index :

CREATE NONCLUSTERED INDEX [IX_TableName_MethodName] ON 
[dbo].[TableName] ([MethodName], [TerminalNo])
INCLUDE (ExceptionMessage,  CreateDate)
WITH (DROP_EXISTING = ON, ONLINE = On)
GO

Second Execution Plan :

For more information about order by : https://www.mssqltips.com/sqlservertip/1337/building-sql-server-indexes-in-ascending-vs-descending-order/