I have one simple query to optimize but somehow after creating couple of index this query is still having more logical reads and time.
DECLARE @CURRENT smalldatetime set @current = '6/30/2013' select KeyInstn, MAX(dateendedstandard) DateEndedStandard from InternalEstimate with (index(AI_OperatorCBGEstimate_HAP)) where dateendedstandard < @Current and mostrecentsequence = 1 and UpdOperation<2 group by KeyInstn
I have created index as
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[OperateEstimate] ([MostRecentSequence],[DateEndedStandard],[UpdOperation]) INCLUDE ([KeyInstn]) GO
But still logical reads are about 66,000 and taking 7-8 second to execute.
Any help would be great help.