Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 89379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:42:26+00:00 2026-05-10T22:42:26+00:00

I have a webservice in java that receives a list of information to be

  • 0

I have a webservice in java that receives a list of information to be inserted or updated in a database. I don’t know which one is to insert or update.

Which one is the best approach to abtain better performance results:

  1. Iterate over the list(a object list, with the table pk on it), try to insert the entry on Database. If the insert failed, run a update

  2. Try to load the entry from database. if the results retrieved update, if not insert the entry.

  3. another option? tell me about it 🙂

In first calls, i believe that most of the entries will be new bd entries, but there will be a saturation point that most of the entries will be to update.

I’m talking about a DB table that could reach over 100 million entries in a mature form.

What will be your approach? Performance is my most important goal.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:42:27+00:00Added an answer on May 10, 2026 at 10:42 pm

    If your database supports MERGE, I would have thought that was most efficient (and treats all the data as a single set).

    See:

    http://www.oracle.com/technology/products/oracle9i/daily/Aug24.html

    https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/datacenter/?p=194

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a WebService using Java. Now I have a @WebMethod that is
We have a dotnet web service that a java using customer wants to connect
I have a Java client that calls a web service at the moment using
We have a java web service application that uses log4j to do logging. An
I have a JAX-RPC (Java) web service that needs to return a complex polymorphic
I have a webservice that when called without specifying a callback will return a
I have a webservice that exists in an asp.net website. When I publish the
Here's a scenario: I have a java front end (RCP/SWT) app which currently has
I have problem with querying webservice which uses WS-Security. I use code creadted by
I have written a java webservice, deployed it on my tomcat and accessed the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.