Can the below query be converted to using an inner join instead of the where IN subquery?
select i.*, it.*
from ItemTypes it
inner join Items i on (i.itemTypeID = it.ItemTypeID)
where i.itemID IN (......)
I might have 100 results returned in the sub-query and I want to avoid having that in a sub-query.
You could use the WITH common table expression (CTE):
You could also define a temporary #Table with an index to hold the selections:
But whatever you do, be careful to measure performance before and after any change.