what is the best way, in terms of performance, to do
multiple insert/update statements, a PreparedStatement or
Batch Updates?
Answer Posted / ravi
It depends on the context. If you have many records that
need to be updated and you are not bothered about having
interactive session, I would choose batch. But that raises
the question, where do you store all the transactions that
need to be persisted/updated until the batch runs. Do you
want to store to a temporaray storage before updated. It
depends on the design on the system.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
When do we get java.sql.SQLException: No suitable driver found?
What is new in JDBC 2.0?
How to insert an image or raw data into database?
What are the three basic components of the odbc architecture?
What are the jdbc api components?
How to insert and delete a row programmatically? (new feature in JDBC 2.0)
Where jdbc drivermanager class is used?
What is jdbc resultsetmetadata interface?
What is difference between odbc and jdbc?
Explain about the Try Block?
What is the return type of execute, executequery and executeupdate?
How can you make the connection using jdbc?
What is SQL Warning? How to retrieve SQL warnings in the JDBC program?
What is jdbc and odbc?
What are the advantages of using preparedstatement over statement?