简体   繁体   English

来自CSV的java derby数据库批量加载

[英]java derby database batch load from CSV

Does Derby have any capabilities from performing a batch insert of data from a CSV? Derby是否具有从CSV执行批量插入数据的功能? The best I could come up with was to read in the file line by line and create a batch SQL update statement and run that. 我能想到的最好的方法是逐行读取文件并创建一个批处理SQL更新语句并运行它。 For 1 million rows that took between 30-40 minutes, as compared with using mySQL's LOAD statement to load from a CSV file which took 2-3 seconds for the same data 与使用mySQL的LOAD语句从CSV文件加载相比,花费30到40分钟的100万行,对于相同的数据需要2-3秒

syscs_util.syscs_import_table will do what you want. syscs_util.syscs_import_table将执行您想要的操作。 Here's the docs: http://db.apache.org/derby/docs/10.5/tools/rtoolsimport91458.html#rtoolsimport91458 这是文档: http//db.apache.org/derby/docs/10.5/tools/rtoolsimport91458.html#rtoolsimport91458

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM