How SQL Server optimizes and caches stored procedure execution plans based on the parameters that are passed the first time a stored procedure (SP) is executed. This discussion will explore a concept called “Parameter Sniffing” and how this can lead to execution plans that are not optimal for all calls to an SP.