I have been learning multithreading recently, and I feel depressed. I used less in projects in the past. Now I want to discuss some of my questions and ask for a better solution:
Requirement: I have 20 million pieces of personnel data. How can I use multithreading to export data to other systems or other places?
Processing Method 1: for example, each thread reads 100 data records, and then inserts the 100 data records into the database. How can I read these 100 pieces of data ??
Method 2: Five threads read data from the database, five threads extract data from a common object, and insert the data to the specified database. There is no problem with multithreading. Is the problem still how to read the first five threads ??
Can the imported data department be repeated ?? Or are there other processing methods ?? Please advise!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.