Answer the question
In order to leave comments, you need to log in
How to quickly add 200k rows in MySql?
Good afternoon. There is a file in the .txt format, after processing which, you need to add data to the MySql database. How to properly organize the addition so that the work goes faster and there is a minimum load on the database?
Answer the question
In order to leave comments, you need to log in
from .txt we generate .sql
in which a long
INSERT INTO MyTable ( Column1, Column2 ) VALUES
( Value1, Value2 ), ( Value1, Value2 )
and then we feed it to MySQL
Find out the maximum query length In Mysql then add rows per packet based on this limit .
If you have vps or mysql built with the in file flag, then the fastest is via csv
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question