I have one old legacy stored procedure, which is taking long time in execution. It takes few parameters. I had reviewed my SP with DBA and she recommended me not to use these parameters directly into the stored procedure instead declare variables inside the SP AND assign those parameters to these variables. And then use it. I still want to understand how it is important? And how it improves performance. I have read about parameter sniffing but could not relate to this particular scenario, if someone could help here.