Any ideas on why adding a sort to this query returns considerably faster than without the order by? I would expect the opposite so what could make this happen?
SELECT TOP (500) r.cID,r.aField,a.Description
FROM dbo.tblR r
inner join dbo.tblA a on r.aID = a.ID
left join dbo.tblX x on x.cID = r.cID
WHERE (ISNULL(x.anotherField,'') <> r.anotherField or x.field3 is null)
and (r.ID=(select max(ID) from tblR where cID = r.cID and
ISNULL(aField,'') <> ''))
and r.cID in (select ID from tblC)
ORDER BY r.cID ASC -- when I comment this line out it runs much slower
The execution plans are not helping out much.