简体   繁体   English

使用ActiveJDBC加载大型数据集

[英]Loading large dataset using ActiveJDBC

I have a SQL script with Insert statements (around 100 rows and might increase in the future) that I would like to execute using ActiveJDBC. 我有一个SQL脚本,该脚本带有Insert语句(大约100行,将来可能会增加),我想使用ActiveJDBC执行该脚本。 Is there a way to do it? 有办法吗?

Yes please see this: http://javalite.io/batch_operations - close to the end of the page. 是的,请参见: http : //javalite.io/batch_operations-页面末尾。 We used this to process millions of records from files in batches of 1000 records each 我们用它来处理文件中的数百万条记录,每组1000条记录

This method presumes that the file has only data, such as CSV file. 此方法假定该文件仅包含数据,例如CSV文件。 If you need to execute SQL verbatim, you can use: Base#exec 如果需要逐字执行SQL,则可以使用: Base#exec

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

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