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 8826943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:15:59+00:00 2026-06-14T07:15:59+00:00

My application needs to change a value in a table if it is not

  • 0

My application needs to change a value in a table if it is not in a very large set (20,000 items) that come in through an XML API. Obviously, it would be easy to create a solution that would be very slow.

I’d like to know how you might recommend doing this? I’m thinking adding the unique IDs of the items in the XML to a temporary table, then executing a single query:

UPDATE item SET status = "deleted" WHERE id NOT IN (SELECT id FROM keep_items);

What do you think?

  • 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. Editorial Team
    Editorial Team
    2026-06-14T07:16:00+00:00Added an answer on June 14, 2026 at 7:16 am

    I ended up using the solution I presented, which was to create and populate a temporary table while the data was being read, and then ran:

    DELETE FROM item WHERE item.id NOT IN (SELECT temp_item.id FROM temp_item);
    

    The result is very fast.

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

Sidebar

Related Questions

My Python High Replication Datastore application requires a large lookup table of between 100,000
My application needs to provide the same data in XML to 2 different providers
In an application that I am working on, on page load, I set innerhtml
I have a table that has an ntext column defined as [value1] [ntext] NOT
I have a sqlite table that has amount field with NUMERIC(10,5) value(I know data
I'm working in mid-size .NET application which has a very very bad if not
I need to change database and settings when my customers load the application (xap)
In my Spring 3.1 application, I sometime need to change the default behavior of
My application needs to send video data frame by frame from Server to Client.
my application needs multiple jars to work. Since it is a desktop application i

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.