Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 33778 invoked from network); 15 Aug 2006 13:00:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2006 13:00:02 -0000 Received: (qmail 12001 invoked by uid 500); 15 Aug 2006 13:00:00 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 11844 invoked by uid 500); 15 Aug 2006 13:00:00 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 11833 invoked by uid 99); 15 Aug 2006 13:00:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 06:00:00 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 05:59:58 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GCyWA-0006AL-Ag for user-java@ibatis.apache.org; Tue, 15 Aug 2006 05:59:38 -0700 Message-ID: <5813616.post@talk.nabble.com> Date: Tue, 15 Aug 2006 05:59:38 -0700 (PDT) From: DavidR To: user-java@ibatis.apache.org Subject: Re: batch insert autocommit setting In-Reply-To: <46d2280d0608150534m23b8c910y747a410cd99d51e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <5811907.post@talk.nabble.com> <8267A5C8B2C7AD4DBE9C29304C6104DE01FD99FC@so1evn001.Office.local> <5812319.post@talk.nabble.com> <46d2280d0608150500n3be9a160k1ec6dfd120cfc399@mail.gmail.com> <5812925.post@talk.nabble.com> <46d2280d0608150534m23b8c910y747a410cd99d51e@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Let me restate the issue. I have an application that is doing inserts. I am changing one parameter -- the defaultAutocommit setting in the application. when i set it to false, the inserts are about 30 a second. When i set it to true, the inserts are 100+ a second. Thus, the question is not about my code or implemetation. Woudl i see a difference in performance if i did startBatch with autocommit or not? This is what is unclear to me since i do not change any other lines in the application. David Koka Kiknadze wrote: > > On 8/15/06, DavidR wrote: >> >> >> I thought i saw around the forums that Ibatis automatically deals with >> this >> behind the scenes? >> Anyway, I cut down my test case to 1000 rows. >> >> >> > Well, imo ibatis automatically deals with this in the sense that it will > batch everything between your startBatch executeBatch calls. So when > inserting thousands of rows you'd better issue executeBatch and commits > periodically. Usually the optimal number of rows to be batched is > detrmined > experimentally (e.g. if I remember it right Oracle recommends some 20-30, > though in my app 1000 performed better). Anyway, I think you should try > profiling your app first to make sure that it's indeed database operation > that slows things down. If it turns out that it's batch inserts that are > performing poorly than I'd try maybe using some other JDBC driver (i.e. > blame the driver)... > > -- View this message in context: http://www.nabble.com/batch-insert-autocommit-setting-tf2108481.html#a5813616 Sent from the iBATIS - User - Java forum at Nabble.com.