Quote:
Originally posted by kcmyl
The inserts are simple, and right now we are using ordinary Statement objects. We thought we can speed it up by using PreparedStatement or CallableStatement to stored procedure. Our tests show that using PreparedStatement is slower than using Statement, and that using CallableStatement is the slowest of the three?
|
I don't think you should expect improved performance of PreparedStatements in your case. Improvement comes from the fact that the SQL optimizer would analyze the PreparedStatement only once and then re-use the execution plan for all subsequent executions of that statement. However, in case of simple insert statements the optimizer overhead is negligible - there's nothing to optimize.
Among the most common ways to increase performance of inserts are:
- reduce the number of indexes on the table
- disable triggers and constraints
- optimize free space management (may be PCTFREE is too high?)
- optimize space allocation (extent size and number, etc).
Hope this helps,
Nick