1. SQL statement. insert is followed by 1000 values for one-time submission. 2. use the connection pool to keep the persistent connection inserted; 3. replace the storage engine of Mysql with Inforbright, convert the data into text, and import data in batches. there are no other better ways to use the queue to keep the maximum insert speed. Recently, there are GB of files to be stored for analysis every day. We look forward to providing guidance on the password.
1. SQL statement. insert is followed by 1000 values for one-time submission. 2. use the connection pool to keep the persistent connection inserted; 3. replace the storage engine of Mysql with Inforbright, convert the data into text, and import data in batches. there are no other better ways to use the queue to keep the maximum insert speed. Recently, there are GB of files to be stored for analysis every day. We look forward to providing guidance on the password.
1. Spell SQL statement. insert is followed by 1000 values for one-time submission;
2. Use the connection pool to keep the persistent connection inserted;
3. Replace the storage engine of Mysql with Inforbright, then convert the data into text and import data in batches.
4. Use a queue to maintain the maximum insert speed
There are no other better methods. Recently, there are GB of documents to be analyzed every day, and we look forward to guiding the secret. <无>
Source code and demo:Source code source demonstration Source
LOAD DATA INFILE 'F:\am_mp3\\data.txt' IGNORE INTO TABLE music.album CHARACTER SET utf8 FIELDS TERMINATED BY ',' lines terminated by '\r\n' (album_id,album_name,singer_name,publish_time,song_count);