Will TSQL return faster results than stored procedure in SQL Server

后端 未结 2 638
旧时难觅i
旧时难觅i 2021-01-22 02:58

I have a stored procedure that works fine previously. It took 4 to 5 secs to get the results.

I didn\'t used this stored procedure for the past two months. When I call

2条回答
  •  無奈伤痛
    2021-01-22 03:36

    You may have bad execution plan associated with that proc. Try this one

    DBCC FREESYSTEMCACHE ('ALL') WITH MARK_IN_USE_FOR_REMOVAL;
    

    You may also find this interesting to read http://www.sqlpointers.com/2006/11/parameter-sniffing-stored-procedures.html

提交回复
热议问题