O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Beyond the Basics

Thus far, we've discussed what is minimally required to query databases via JDBC. However, there are a number of additional JDBC techniques that can have a significant impact on performance and scalability. In this section, we'll discuss each of these advanced methods.

Prepared Statements

Recall from our discussion of database concepts that query processing generally boils down to three phases: query parsing and syntactic checking, query plan generation, and plan execution. The first phase can seem unnecessarily costly, especially if we repeatedly execute the same query (or the same kind of query). We know that the SQL is correct and we hope that the database caches previous parsed queries, but we can't be sure. Database vendors ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required