When should I use stored procedures?

前端 未结 19 2537
眼角桃花
眼角桃花 2020-12-04 10:53

When should I be using stored procedures instead of just writing the logic directly in my application? I\'d like to reap the benefits of stored procedures, but I\'d also lik

19条回答
  •  清歌不尽
    2020-12-04 11:37

    When all the code is in a stored proc, it is far easier to refactor the database when needed. Changes to logic are far easier to push as well. It is also far far easier to performance tune and sooner or later performance tuning becomes necessary for most database applications.

提交回复
热议问题