I hope this is an easy question to answer. 🙂
I'm joining a large table to a small table and results in an index scan on the large table, returning 1 million rows, which is then hash joined to the 2 rows returned by the small table
select ST.col1, ST.col2, .ST.col3. LT.col4
from SmallTable as ST
inner join LargeTable as LT ST.col1 = LT.col1
where ST.col2 = 6
Is there a better way to join these tables, so there isn't a table scan on the large table?