Why execute stored procedures is faster than SQL query from a script?

前端 未结 8 2144
别那么骄傲
别那么骄傲 2020-11-30 03:31

In fact, if I call the stored procedures from my application, I need a connection to my DB.

So, why calling a \"stored procedures\" should be faster than \"passing a

8条回答
  •  甜味超标
    2020-11-30 03:49

    1. Stored procedures sometimes run a little bit faster because or using RPC calls when possible
    2. SP runs faster for queries that have to be recompiled - for ex. - using temp tables creations somewhere in the middle

提交回复
热议问题