Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days
by Mandar S. Chitnis, Lakshmi Ananthamurthy, Pravin S. Tiwari
The PreparedStatement Interface
Statement objects are the simplest way to execute SQL statements. But the Statement objects are not optimized or tuned and so they suffer from poor performance when complex SQL statements are executed. This happens primarily because the Statement object is responsible for building the SQL statement. The Statement object sends the SQL statement to the database where it is then checked for syntax and semantics, compiled, and executed. Because this process occurs for each SQL statement executed using the Statement object, complex SQL statements or repetitive SQL statements perform poorly. To get around this, the JDBC API provides an improved and optimized version of the Statement object called the PreparedStatement ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access