如何在MySQL中看到.csv上传的进度 [英] How to see progress of .csv upload in MySQL

查看:298
本文介绍了如何在MySQL中看到.csv上传的进度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常大的.csv文件,我使用LOAD DATA INFILE命令将其加载到mysql中。因为它需要这么长时间,我想看看上传有多远的进步。



我已经尝试了2个方法到目前为止
首先,我只是做了一个SELECT COUNT(*)命令来查看已经插入了多少行作为上传正在进行,但总是返回一个计数0.

其次,我试过SHOW PROCESSLIST,看到查询已经运行了多长时间。有时状态显示为释放数据或某种效果。



有没有人知道一个很好的方法来跟踪LOAD DATA INFILE命令的进度?

解决方案



<

http://www.stephenchu .com / 2008/12 / speed-up-your-mysql-data-load.html ,可以使用 SHOW INNODB STATUS 如果表是Innodb



我链接的页面也有一些很好的调优建议,以此方式加载数据来提高整体性能。 / p>

I have a very large .csv file, and I'm loading it into mysql with the LOAD DATA INFILE command. Because it takes so long, I'd like to see how far along the upload has progressed.

I've tried 2 methods so far- First I simply did a SELECT COUNT(*) command to see how many rows had been inserted as the upload was in progress, but that always returns a count of 0.
Second, I tried SHOW PROCESSLIST and saw simply how long the query has been running. sometimes the status says 'freeing data' or something to that effect.

Does anyone know a good way to track the progress of a LOAD DATA INFILE command? Also, does anyone know how to track the insertion rate?

Thanks

解决方案

From http://www.stephenchu.com/2008/12/speed-up-your-mysql-data-load.html, you can use the SHOW INNODB STATUS IF your table is Innodb type, which you didn't happen to mention.

The page I linked to also has some good tuning suggestions to improve your overall performance with loading data in this manner.

这篇关于如何在MySQL中看到.csv上传的进度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆