Phil
Phil

Reputation: 1849

Is it normal for Mysql to take very long to import a big sql file?

Several days ago, I downloaded the Wikipedia "External Links" sql file. The external links table has three columnns: the first is an int(8) and the two others are a blob which has a url in it. I started importing the sql file, which has a size of 9.3 GB, with phpmyadmin, and it is now over 50 hours later, and the import process hasn't finished yet! There are so far over 33 million rows inserted.

Is it normal for it to take THAT long, or is there something wrong with my setup?

Note: my server is an e3-1230 with 16 GB of RAM.

TIA!

Upvotes: 2

Views: 3051

Answers (1)

Yul
Yul

Reputation: 3276

It seems too long. This is for your reference.

Specification of my computer : - Windows 10 home - Intel Core i5-3317U [email protected] - 6GB of RAM memory - 750 GB 5400 RPM hard drive - MySQL 5.7 and MySQL Workbench 6.3CE

I imported two files which were downloaded from NYC open data portal. NYC taxi fare.csv : 1.67 GB of the size, 11 columns, 15749228 rows. nyc311calls.csv : 5.83 GB of the size, 53 columns, 11145686 rows

The sql script is the below LOAD DATA LOCAL INFILE 'C:/test_data/FILE_NAME' INTO TABLE DB_NAME FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 ROWS;

Running time to import fare.csv : 320.706 sec (less than 6 minutes) Running time to import nyc311calls.csv : 968 sec (about 16 minutes)

Upvotes: 1

Related Questions