Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

sql insert in Java vs. sql dts package

807601May 2 2008 — edited May 2 2008
Hi,

I was wondering the speed difference between inserting records to database from Java as oppose to inserting records using a sql server dts package. I'm talking about 3000+ records.

See Java when inserting records to database it looks something like this:
while (recordHasNext)
{
   String insertStr = "insert into table(item) values(" + valueVariable + ")";
   statement.executeQuery(insertStr);
}
where as if I'm executing a dts package I would create a .bat file with the following commands:
DTSRUN.EXE /S ServerName /E /N PackageName /F FileName
And then have Java execute the batch file.

So my question is, which is faster for the amount of records I'm inserting?

thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2008
Added on May 2 2008
5 comments
329 views