We have a number of complex queries in stored procedures that sometimes run well (under 5 seconds), but other times take several minutes (with an entirely different explain plan). The bad explain plan occurs, even after a dbcc dbreindex on all tables and indexes, and after an update statistics with fullscan on all tables and indexes. If we localize variables (suspecting parameter sniffing) this seems to resolve the issue. However, I feel that due to the complexity of the statement, that it could be rewritten. I was wondering if a left outer join converted to an inner join, might help. Is there a way of turning an outer join into an inner join, even if it means using an additional temp table? We are running SQL 2005, SP1, on Windows 2003.