db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Maximum amount of data suitable for Derby
Date Fri, 29 Aug 2008 16:27:47 GMT
Hi Dmitri,

If you are bulk-loading this data, then the following may help

1) You can use JDBC statement batching. Please see the javadoc for 
Statement.addBatch(), PreparedStatement.addBatch() and 
Statement.executeBatch() as well as this link: 

2) You can also use table functions to bulk import data from an external 
data source. Please see the section titled "Programming Derby-style 
table functions" in the Derby Developer's Guide: 
http://db.apache.org/derby/docs/10.4/devguide/ Examples of how to code 
and use table functions can be found in the 10.4 source code under 
java/demo/vtis. If you wrap your external data in a table function 
called MyExternalData, then you can efficiently bulk import your data 
with the following statement:

   insert into myTable select * from table( MyExternalData() ) s

Hope this helps,

Dmitri Pissarenko wrote:
> Hello!
> The main problem (at the moment) is the insertion of these data.
> What can I do to improve the speed, at which the data are inserted
> (apart from using prepared statements instead of normal ones and
> setting "durability=test") ?
> Thanks in advance
> Dmitri Pissarenko

View raw message