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


Please Help Members By Posting Answers For Below Questions

Discuss the procedure of retrieving warnings?

763


Describe the steps needed to execute a sql query using jdbc.

780


What is drivermanager in jdbc?

760


What are the common jdbc exceptions?

746


What are the three parts of a jdbc url?

801


Under what circumstances, that all four drivers are used?

2149


How we can you use preparedstatement.

780


Is java a database?

740


what happen if we set JDBC string to NULL?

3176


Explain the difference between resultset and rowset in jdbc

796


How to make updates to updatable result sets in jdbc?

713


Is possible to open a connection to a database with exclusive mode with JDBC?

767


What is ojdbc14 jar?

686


What is jdbc in dbms?

750


What are the considerations for deciding on transaction boundaries?

791