Why is 'LOAD DATA INFILE' faster than normal INSERT statements?
24
votes
3
answers
40375
views
I've read an article that mentioned we can achieve **60,000 inserts per second** by using the
LOAD DATA IN FILE
statement, that reads from csv files and inserts the data into a database.
Why should it differ from normal inserts?
**EDIT:**
I reduced the round-trip by calling just one INSERT
statement:
INSERT INTO tblname
VALUES (NULL,2,'some text here0'),(NULL,2,'some text here1')
,(NULL,2,'some text here2'),(NULL,2,'some text here3')
.....,(NULL,2,'some text here3000');
What about this?
Asked by Alireza
(3676 rep)
Apr 20, 2012, 10:35 AM
Last activity: Aug 30, 2017, 06:49 AM
Last activity: Aug 30, 2017, 06:49 AM