12.4. Stored Procedures

You are likely aware that one way to increase performance in your database-intensive applications is to offload as much work as you can to the database. Databases can perform many calculations, create aggregate values, sort, and perform very advanced kinds of queries. Even if you are only writing simple queries, it is probably not a bad idea to have your database doing more for you, and a good way to do that is to write stored procedures.

But perhaps the chief reason that stored procedures are popular among developers is that they allow you to group a number of SQL statements together, more accurately and efficiently representing a real business process (that is, procedure). Stored procedures run fast because they are ...

Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.