When the query plan is compiled on first run of the procedure after a SQL Server restart, the query is optimised for those initial variables in that initial call. There’s ways to write the procedure to have a more representative query plan chosen on initial compile each time: http://blogs.msdn.com/b/queryoptteam/archive/2006/03/31/565991.aspx This is what is known as parameter sniffing.