Best Practices for JDBC
There are a number of best practices that enable your JDBC-based applications to be as successful as possible:
Make Your Queries as Smart as Possible
Learning to select only the data you really want at the server side is crucial. For many applications where performance is a problem, it is often due to poorly written SQL. Typical problems include returning too many rows, queries that are too general, and so forth. There are many tricks for SQL that are worth learning to optimize performance. Some are simple while some are complicated. While SQL joins and subqueries are beyond the scope of this book, there are simple things that you can do to improve your performance, such as using prepared statements and accessing stored ...