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

前端 未结 8 2143
别那么骄傲
别那么骄傲 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 04:04

    stored procedures are compiled and cached. But SQL statements will be compared to existing execution plans and if a match is present used, thus nullifying somewhat any advantage.

    Whats the actual performance difference after a number of executions ?

提交回复
热议问题