CSV导入和使用LOAD DATA的CSV之间的差异? [英] Difference between CSV import and CSV using LOAD DATA?

查看:154
本文介绍了CSV导入和使用LOAD DATA的CSV之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在phpMyAdmin中,有两个选项可用于导入CSV文件。

In phpMyAdmin there are two options to import a CSV file.

一个是CSV。另一种是使用LOAD DATA的CSV。

One is CSV. The other is CSV using LOAD DATA.

这两者之间有什么区别?是否有优势?

What's the difference between these two? Is there an advantage to using one over the other?

推荐答案

LOAD DATA INFILE 是一个完全独立于PHPMyAdmin的MySQL查询。

LOAD DATA INFILE is a MySQL query that works completely independently of PHPMyAdmin.

CSV导入可能涉及将文件上传到PHPMyAdmin服务器,在其中解析文件并构建一系列要对服务器运行的INSERT语句。

The CSV import probably involves uploading the file to the PHPMyAdmin server, where it parses the file and builds a series of INSERT statements to be run against the server.

不信任任何PHPMyAdmin ;-) - 但是,实际的性能可能取决于你的表结构和数据。

Personally, I wouldn't trust anything PHPMyAdmin does ;-) - however, actual performance will probably depend on your table structure and the data.

然而,我会注意到,从LOAD DATA INFILE命令插入数据时非常有效的快捷方式。

I will note, however, that MySQL takes some very efficient shortcuts when inserting data from a LOAD DATA INFILE command.

这篇关于CSV导入和使用LOAD DATA的CSV之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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