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

What are the steps to connect to the database in java?

718


Why do I have to reaccess the database for Array, Blob, and Clob data?

763


What is transaction processing in jdbc?

760


How can I get information about foreign keys used in a table?

738


What is jdbc type?

693


Is jdbc and orm?

720


How do I know which jdbc driver to use?

775


How can I retrieve a String or other object type without creating a new object each time?

878


Is jdbc a framework?

670


What is jdbc and jpa?

709


What are the different types of statements? How we can you use preparedstatement.

711


Where is jdbc used?

703


What is jdbc connection class?

665


What class.forname will do while loading drivers of jdbc?

693


Where can I find ojdbc14 jar file?

707