I have an excel file with 50000 rows and I'm updating a MySQL table using hibernate by uploading that excel file from a Java Program. It is taking a huge time to update all the rows. Can it be possible if I divide batches of 100 rows in excel file and assign different batches of rows to different threads to concurrently update the rows in table from multiple threads ?
Mysql – Updating rows in tables concurrently using Multithreading in Java
hibernatejavamulti-threadMySQL
Related Question
- MySQL: Updating or closing existing rows in a table and/or inserting new rows
- Mysql – Updating multiple thesql rows where column has specific value
- Mysql – Update column with different value for multiple rows using a csv file
- Mysql – AWS RDS thesql deadlock
- Mysql – Queries of MySQL from Java are executed serially from multiple threads
Best Answer
You can split your file into multiple files.
Try POI-HSSF and POI-XSSF - Java API To Access Microsoft Excel Format Files (Apache POI Project)
Here's an example of how to read an Excel file :