Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

When do we get java.sql.SQLException: No suitable driver found?

908


What is new in JDBC 2.0?

955


How to insert an image or raw data into database?

950


What are the three basic components of the odbc architecture?

869


What are the jdbc api components?

1097


How to insert and delete a row programmatically? (new feature in JDBC 2.0)

941


Where jdbc drivermanager class is used?

909


What is jdbc resultsetmetadata interface?

914


What is difference between odbc and jdbc?

940


Explain about the Try Block?

918


What is the return type of execute, executequery and executeupdate?

1064


How can you make the connection using jdbc?

988


What is SQL Warning? How to retrieve SQL warnings in the JDBC program?

988


What is jdbc and odbc?

881


What are the advantages of using preparedstatement over statement?

937