• Hi,

    I updated as the people here suggested.

    when i only run :

    SELECT TOP (100) ID

    FROM dbo.TableA

    WHERE TableAStatusTypeID IN (1, 5, 9) AND LastUpdateTime <= dateadd(ss, Retries * -30, @CurUtcDate)

    ORDER BY LastUpdateTime ASC

    I still get an index scan although Reties column is included in the index.

    but when i change Retires to a value - say "100" , it uses index seek.

    i was trying to change the order in the index and run it again - but it still uses index scan.

    what shall I try now?