FIGURE 1 Inefficient execution plan for version 1 of the stored procedure |--Filter(WHERE:(([Orders].[CustomerID]=[@CustomerID] OR [@CustomerID]=NULL) AND ([Orders].[EmployeeID]=[@EmployeeID] OR [@EmployeeID]=NULL))) |--Bookmark Lookup(BOOKMARK:([Bmk1000]), OBJECT:([tempdb].[dbo].[Orders])) |--Index Scan(OBJECT:([tempdb].[dbo].[Orders].[idx_unc_OrderID]), WHERE:(([Orders].[OrderID]=[@OrderID] OR [@OrderID]=NULL) AND ([Orders].[OrderDate]=[@OrderDate] OR [@OrderDate]=NULL)))