How to precompile stored procedures in SQL server? -
Good morning!
Is there a way to compile procedures stored in SQL Server? My requirement is like this .. I have some stored procedures, which take more time to compile compared to execution. So I want to precompile all the stored procedures. DB server will be good to precompile them when starting and running.
Any ideas on this would be very helpful!
Thanks & amp; Regards, Pawan.
You can force compile again, but it will not be until the next time you run
Force it to be reconstituted every time:
Make your process name PROCOM NOMINATION RECOMPILE .... .
Apply this to recompile this time:
EXEC with your processing name
Edit :
based on Op's comments Why not run it manually with the fake data (outside of the app) (It is not that the execution plan is bad, though, Google: SQL Server parameter spoofing and sniffing) make a compile, then run some SQL which put it I went. When users run it for the first time, it will already be played and compiled.
Comments
Post a Comment