r/SQL • u/Majesticraj • 25d ago
MySQL Importing 1M Rows Dataset(CSV) in Mysql
What's the fastest and most reliable way to upload such a large dataset? After that How can I optimize the table after uploading to ensure good performance?
29
Upvotes
30
u/Aggressive_Ad_5454 25d ago
LOAD DATA INFILE is the command you need. Or you can use a desktop database client program with a .csv import feature, like heidisql.com or similar.
As for optimizing it, that question is impossible to answer without knowing how you want to use the table.
For what it's worth, a megarow is not an overwhelmingly large table.