I have to write a program which utilizes threads. In my program I have to connect to a Database and execute a massive number of UPDATES on a table--arround 2000 to 5000 records needs to be updated.
I am planning to use threads. So, I can spawn multiple threads to optimize the process.
I have some questions and I hope someone shed light on this area.
I have a list of Ids (2000 to 5000) in a Database table and I need to read those values and UPDATE another table based on those values read from the first table,
If I open two threads, how can I pass/read the list of values from my first table to the program/threads?
Should I read/load them in memory first, in some Array or HashMap or something?