db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: Large multi-record insert performance
Date Wed, 14 Mar 2007 21:16:07 GMT
You might also want to look at StringBuilder if your code is not running 
in multiple threads as it is more performant than StringBuffer

Øystein Grøvlen wrote:
> Sedillo, Derek (Mission Systems) wrote:
>
>> Iterate an array of 1000 records and create a VALUES clause string to 
>> look like:
>> /String records = "(1,1,1), (2,2,2), (3,3,3), (4,4,4), …(1000, 1000, 
>> 1000)";/
>
> You might already know, but make sure to use a StringBuffer when you 
> are doing this so you avoid creating a new String object for every 
> triplet you append.
>
> -- 
> Øystein

Mime
View raw message