Sriram Sanka

Databases | Cloud | Infrastructure | Security |

MySQL Load Data Statement – Performance

Posted by Sriram Sanka on December 10, 2021

As mentioned in the MySQL Documentation here https://dev.mysql.com/doc/refman/8.0/en/load-data.html ,

The LOAD DATA statement reads rows from a text file into a table at a very high speed. The file can be read from the server host or the client host, depending on whether the LOCAL modifier is given. LOCAL also affects data interpretation and error handling.

Lets Run a Quick Test !

Loading Data Into a Table in the local Database using MySQL workbench Executed around 35Min (2098.781 Sec) for 35K records.

Now Lets Truncate the Table and re-load the data using LOAD DATA Statement

BOOM ! Job Done within 2 Sec.

Leave a Reply

 

Discover more from Sriram Sanka

Subscribe now to keep reading and get access to the full archive.

Continue reading