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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:48:13+00:00 2026-06-13T04:48:13+00:00

I have one table with almost 2 million records on my SQLite database, some

  • 0

I have one table with almost 2 million records on my SQLite database, some records have null birthday and I would like to fix with data from antoher database since the ids are the same on both I can reference it for this update.

However I am having an issue for reading and I believe I will have antoher for updating it.

Reading issue, is there a way to get all the ids from the result without having to read 1 by 1 ?

Query being executed is (birthday is indexed):

SELECT id FROM personal WHERE birthday IS NULL OR birthday = ''

Currently I do this to retrieve all ids (which take something like 3 minutes for the first 300k records and then increase to something like 9 minutes for 250k records and keep growing the delay):

while (reader.Read())
{
    ids.Add(reader.GetInt32(0));
}

After I will reuse the ids list to execute an update to each record with the correct birthday which I assume I will run into the same issue, it will take a long time to get it done by inserting 1 by 1, which bring us to what I believe that will be the second issue.

Is there a fast way to update all the records with the needed data ?

NOTE: the birthdays I will read for updating the SQLITE will come from a remote MySQL server and as such I cannot link the 2 in 1 query like update select etc.

Table format is:

id
first_name
last_name
birthday
email
status

When I run the same query on SQLite Admin it takes 2371ms to spit all the data, so I assume I must be reading it wrong or reading 1 by 1 must be hurting it really bad.

  • 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-13T04:48:14+00:00Added an answer on June 13, 2026 at 4:48 am

    Execute this SQL on your database. No need to iterate over all the records. It does all you need in one action:

    UPDATE
        Persons
    SET
        Persons.birthday = OtherTable.birthday
    FROM
        Persons
    INNER JOIN
        OtherTable
    ON 
        Persons.ID = OtherTable.ID
    WHERE 
        Persons.birthday IS NULL OR Persons.birthday = ''
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one table that has sales records and another table that has additional
I have a table structure looking something like this. One outer table and in
I have basically MySQL dump from a WordPress database with some data. The whole
Background: I have a table with 5 million address entries which I'd like to
We have a large table in SQL Server with almost 40.000.000 records. it took
I need to perform normalization on data structure. I have one table with lots
I have one table which contains events and dates, and another which contains the
I have one table that has two fields - ID1 and ID2 ID1 can
I have one table having ID and other attributes. How can I get list
I have one table, t1, which has fileds called userid, week and year fields.

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.