mySql:对批量插入的合理限制

发布于 2024-11-03 05:11:39 字数 138 浏览 10 评论 0原文

我从客户端收到大量 CSV 数据,我计划将其插入到 mySql 数据库中并在我的应用程序中处理数据。大约涉及10张桌子。每行小于 1k 字节。在单独插入时我应该遵守哪些限制?我在每个表中有几百万行要插入。

让我知道是否需要提供重要数据,例如架构。

I am receiving a large amount of CSV data from a client that I plan to insert into a mySql database and process the data within my application. There are about 10 tables involved. The rows are less than 1k bytes each. What limits should I obey in individual insertions? I have quite a few millions of rows in each table to insert.

Let me know if there are salient data I should provide, such as the schema.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

随波逐流 2024-11-10 05:11:39

如果您使用load data infile将数据输入到表中,则无需遵守任何限制。

链接: http://dev.mysql.com/doc/refman /5.1/en/load-data.html

If you use load data infile to input the data into your tables, there is no limit that you need to obey.

Link: http://dev.mysql.com/doc/refman/5.1/en/load-data.html

靑春怀旧 2024-11-10 05:11:39

如果你有大量的插入,你可以使用MySQL的INSERT DELAYED查询,或者你可以增加bulk_insert_buffer_size,这是一个系统变量。单击bulk_insert_buffer_size

对于 INSERT DELAYED 语法单击此处

If you have large number of insertions than you can use INSERT DELAYED query of MySQL or you can increase bulk_insert_buffer_size which is a system variable. Click bulk_insert_buffer_size.

For INSERT DELAYED syntax Click here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文