You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by JeanNiBee <Jo...@nuance.com> on 2009/03/07 07:09:49 UTC

Performance question - INSERT statement using ibatis.

Hi

I’m just curious if you any one has performance tips I could us when
inserting (or updating) many rows of data in the database.

My tests are currently querying 10k rows of data from a DB and processing
this data w/ a Row handler... these 10k rows turn into what I'll call about
400 modules (Summarized data / counts of what the row handler iterated
over). All this runs in about 20 seconds. Once this is complete I have to
update that Moule state in my database, no matter what I try (wrt java
optimizagion of memory / object creation etc) I can't get better than 1
insert/update per second. Seems VERY poor to me. 

Note: I am using MSSQL Server 2005.

I"m using 'vanilla' ibatis w/ a query file and nothing special with respect
to connection pooling and all that so anything you all can point me too
would be good.

I'll check out my execution plan in the meantime but I am not sure this will
find anything as it's a simple 'INSERT' or 'UPDATE'. No crazy indices on the
table or anything like that.

Thanks for the help!
-- 
View this message in context: http://www.nabble.com/Performance-question---INSERT-statement-using-ibatis.-tp22384828p22384828.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Performance question - INSERT statement using ibatis.

Posted by JeanNiBee <Jo...@nuance.com>.
Hi

Yes I should have updated my post last night, I found out about the batch
updates and they helped a LOT. The performance of the inserts is still poor,
but bit better.

Now I have to figure out how to make sure I don't overload the batch by
putting too many inserts into it before executing them.

Thanks.


Have you used batch execution?

Best Regards,
Kengkaj S.
email: kengkaj.s@gmail.com

-- 
View this message in context: http://www.nabble.com/Performance-question---INSERT-statement-using-ibatis.-tp22384828p22390090.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Performance question - INSERT statement using ibatis.

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
Have you used batch execution?

Best Regards,
Kengkaj S.
email: kengkaj.s@gmail.com
----- Original Message ----- 
From: "JeanNiBee" <Jo...@nuance.com>
To: <us...@ibatis.apache.org>
Sent: Saturday, March 07, 2009 1:09 PM
Subject: Performance question - INSERT statement using ibatis.



Hi

I’m just curious if you any one has performance tips I could us when
inserting (or updating) many rows of data in the database.

My tests are currently querying 10k rows of data from a DB and processing
this data w/ a Row handler... these 10k rows turn into what I'll call about
400 modules (Summarized data / counts of what the row handler iterated
over). All this runs in about 20 seconds. Once this is complete I have to
update that Moule state in my database, no matter what I try (wrt java
optimizagion of memory / object creation etc) I can't get better than 1
insert/update per second. Seems VERY poor to me.

Note: I am using MSSQL Server 2005.

I"m using 'vanilla' ibatis w/ a query file and nothing special with respect
to connection pooling and all that so anything you all can point me too
would be good.

I'll check out my execution plan in the meantime but I am not sure this will
find anything as it's a simple 'INSERT' or 'UPDATE'. No crazy indices on the
table or anything like that.

Thanks for the help!
-- 
View this message in context: 
http://www.nabble.com/Performance-question---INSERT-statement-using-ibatis.-tp22384828p22384828.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.