Hi. I have a text file with 500.000 inserts in SQL.
"insert into knowledge_2('knowledge_id','phrase_id','word_text') value(4,15,'user');"
What's the fastest way to insert them into a MySQL table? I've tried MyDump but the result was very slow. Must I write anything else into the SQL file to make it perform bulk inserts?
MyLoader is not an option. Can you help?
Thanks.
Bulk insert
-
AndreyZ
Hello,
Please try using transactions and the TMyDump component in the following way:
Please try using transactions and the TMyDump component in the following way:
Code: Select all
MyDump.Connection.Open;
MyDump.Connection.StartTransaction;
MyDump.RestoreFromFile('your_filename');
MyDump.Connection.Commit;