 <p>The first thing you should do is <a href="http://www.sql-server-performance.com/tips/query_execution_plan_analysis_p1.aspx" rel="nofollow noreferrer">analyze the query plan</a>, to see what indexes (if any) SQL Server is using.</p> <p>You can probably benefit from some <a href="http://www.sql-server-performance.com/tips/covering_indexes_p1.aspx" rel="nofollow noreferrer">covering indexes</a> in this query, since you only use columns in <code>Lineinfo</code> and <code>Order_Header</code> for the join and the query restriction (the WHERE clause).</p>