crystyp:
select top 1 *
from statushistory
where sth_number in
(select pac_parcelNumber
from package)
AND sth_fk_sge is null
AND sth_fk_sat = 27
Ruleaza asta cu SET STATISTICS IO ON; si vezi daca accesul e scan sau seek (cite logical reads pe fiecare rowset).
Altfel:
1) TOP 1 fara ORDER BY este incorect
2) sth_number IN (select) este inner join mascat, scoate-l afara explicit ca JOIN
http://rusanu.com