Advantages of using stored procedures
- Prevent SQL injection
- If the change or bug is in SP, just fix the SP and release it
- Reduce bandwidth consumption
- Monitor performance by viewing execution history like execution count, last execution time and total elapsed time
- Can stop SP if it takes too long or is consuming too much CPU or RAM
- Permission control using roles
- Can view SP execution plan and make it better
- Transactions
- Reduce duplication and enable re-use
- Better performance due to cache