I'm running some LOAD DATA LOCAL INFILE
statements to insert a large amount of data (gigabytes) into a MySQL 5.5 database. The statements look like this:
LOAD DATA LOCAL INFILE '/mnt/feeds/20120801/itunes20120801/application'
REPLACE INTO TABLE app_store_applications
FIELDS TERMINATED BY X'01'
LINES TERMINATED BY X'020A'
(export_date, id, title, recommended_age, artist_name, seller_name, company_url, support_url, view_url, artwork_url_large, artwork_url_small, @itunes_release_date, copyright, description, version, itunes_version, download_size)
SET itunes_release_date=STR_TO_DATE(@itunes_release_date, '%Y %m %d')
This has been working the whole time, however, since yesterday the same queries which have worked previously seem to stall every time on the query end
step (shown by SHOW PROCESSLIST
).
When I check the table content, all the data has been correctly inserted by then, so there's no reason for the query not to finish. Still, a query which has inserted all data after 30 minutes will still be stuck on query end
after about 10 hours. What could be the reason for this?
Update: I recently set up a replication, with this DB acting as the master. It might be that there is some problem writing the data to the binary logs, and that this prevents the query from finishing?