Benefits One of the main reasons for using stored procedures is to reduce the network traffic in a distributed environment caused by client application programs that execute many remote SQL statements. Remote SQL statements can create many network send and receive operations to the server. A stored procedure can encapsulate many of the application's SQL statements into a single message to DB2, thus reducing network traffic. Another reason for using stored procedures is to encapsulate a business function into a single module, coded once, and stored at the server for all processes to use. (See Figure 8-1.) Figure 8-1. Stored procedure network improvements.
Additional BenefitsSome of the additional benefits of stored procedures include the following:
|
Team-Fly |
Top |