java derby数据库批量从CSV加载 [英] java derby database batch load from CSV

查看:392
本文介绍了java derby数据库批量从CSV加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Derby是否具有从CSV执行批量插入数据的任何功能?最好的我能想出的是一行一行地读取文件,并创建一个批处理SQL更新语句并运行它。对于花费30-40分钟的100万行,与使用mySQL的LOAD语句从CSV文件加载相同数据花费2-3秒相比。

Does Derby have any capabilities from performing a batch insert of data from a 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. 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

推荐答案

syscs_util.syscs_import_table可以做你想要的。以下是文档: http://db.apache.org/ derby / docs / 10.5 / tools / rtoolsimport91458.html#rtoolsimport91458

syscs_util.syscs_import_table will do what you want. Here's the docs: http://db.apache.org/derby/docs/10.5/tools/rtoolsimport91458.html#rtoolsimport91458

这篇关于java derby数据库批量从CSV加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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