Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 36286 invoked from network); 4 Feb 2009 00:17:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 00:17:04 -0000 Received: (qmail 48773 invoked by uid 500); 4 Feb 2009 00:17:01 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 48760 invoked by uid 500); 4 Feb 2009 00:17:01 -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 48742 invoked by uid 99); 4 Feb 2009 00:17:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2009 16:17:01 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of clinton.begin@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 00:16:53 +0000 Received: by wa-out-1112.google.com with SMTP id k40so1154234wah.0 for ; Tue, 03 Feb 2009 16:16:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=xXlfs2cxztq5GwrZ6HYJoyKjCKSUMP3JLwFwa9nCoMc=; b=iVUz6mGPnwVR8b3YxUSbm5qg+zKCTMd0FglIGtE+qwgDdv+y9vR1c4+7Wh10kN85pJ 0rEylbZ70aAJ3OtJ3go7eSQmoqH9rIk9CfssJiiwqUcGdhBzKgKV4xaVvW54VH0PYF1g lh+BX3C2cifk01FUoTkL+T7xX7gbcl7WzMyiA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BD5WSbsLsyXVj6UAMNt4LwJgGxj7HgFxUbt3QcsGZA9xoqFYmG6rE+W0bBOepaB7y2 8S3wBgGef+HSNjbVTyzvPJ5jcO9c2htsbSycdF+hwF6p4ASxjsfvycZ9C5zBLjeI+R0l 9b7gQiQBUMkMJUfweMJPo1vIYwJ30R+uBikh8= MIME-Version: 1.0 Received: by 10.114.167.3 with SMTP id p3mr4028529wae.127.1233706590721; Tue, 03 Feb 2009 16:16:30 -0800 (PST) In-Reply-To: References: <006701c98566$cae6ede0$60b4c9a0$@com> <16178eb10902021141p3146f89bg8274489cdeb07c0f@mail.gmail.com> <001a01c9861d$0def2600$29cd7200$@com> <49887AF0.40403@kaigrabfelder.de> <16178eb10902031214s68e7dbeau1998849ebe19b7bf@mail.gmail.com> <55efbd800902031449v694b2cbbh9edb70249a239ee3@mail.gmail.com> Date: Tue, 3 Feb 2009 17:16:30 -0700 Message-ID: <16178eb10902031616k7f139876j3e8cd4a46f41f802@mail.gmail.com> Subject: Re: Performance & SQL Formatting Issue From: Clinton Begin To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks for running these tests Jeff.... I'll roll back the change I made unless it's confirmed that formatting is an issue. Clinton On Tue, Feb 3, 2009 at 4:37 PM, Jeff Butler wrote: > I'll take that challenge! :) > > In the test as distributed, each insert is a new transaction so there > is no statement caching. > > I reran the test making all the inserts into one transaction - and > then with and without statement caching enabled. As you might > imaging, the performance was far superior - about 1.5 seconds for each > set of 10,000 inserts. Again, no noticeable difference between > formatted and unformatted SQL. The statement cache did knock off > about 0.2 seconds off execution time - I guess that's a good > improvement. > > The point for me is that the formatting of the SQL has nothing to do > with performance. The difference was whether each insert was a > separate transaction, or whether there was one transaction for all > inserts. > > Interesting - I see about the same vast difference in performance as > reported by M Goodal, but the difference is the transactional > configuration - NOT the format of the SQL. > > Jeff Butler > > > On Tue, Feb 3, 2009 at 4:49 PM, Chema wrote: >> I'm sorry to ask it again : >> >> about PerformanceTest.java by Jeff , all inserts inside loop are >> executed in same thread >> >> I guess first one is cached into statement cache, isn't it ? >> So, this test wouldn't be right because text formatting is performed >> only one time. >> >> If I'm wrong in my concept about working of statement cache, please, tell me >> >> Thanks and regards >> >> >> >