SQL poor stored procedure execution plan performance - parameter sniffing

后端 未结 3 1006
花落未央
花落未央 2020-11-29 07:17

I have a stored procedure that accepts a date input that is later set to the current date if no value is passed in:

CREATE PROCEDURE MyProc
    @MyDate DATET         


        
3条回答
  •  猫巷女王i
    2020-11-29 07:48

    Declare the procedure parameter inside the procedure and pass the external parameter to the internal .. compile ..

提交回复
热议问题