posted 17 years ago
PreparedStatement is more efficient than Statement object if you are executing similar statements multiple times. When a PreparedStatement is created, the SQL statement is sent to the database for precompilation. The precompiled form of a prepared statement is cached only as long as the PreparedStatement instance is alive, so the performance benefits are only obtained when reusing the same PreparedStatement instance, setting different parameters on each invocation.