Scalability and Performance Hints
Our survey of advanced JDBC techniques has already given us an idea of some of the scalability and performance strategies we can employ. In this section, I review the most important ones and suggest some additional strategies for improving efficiency and throughput.
Use PreparedStatement When Possible
Not surprisingly, precompiling statements can make a big difference in performance. To quantify this a bit, consider how it improves querying 1,000 rows as well as updating 10,000 rows. As I described earlier, a given servlet or EJB instance on a busy site may do this tens of thousands of times over the course of ...
Get Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology 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.