Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 77708 invoked from network); 29 Jan 2007 15:51:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2007 15:51:30 -0000 Received: (qmail 71886 invoked by uid 500); 29 Jan 2007 15:51:33 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 71868 invoked by uid 500); 29 Jan 2007 15:51:33 -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 71857 invoked by uid 99); 29 Jan 2007 15:51:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 07:51:32 -0800 X-ASF-Spam-Status: No, hits=3.9 required=10.0 tests=FROM_ALL_NUMS,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of 226057@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 07:51:24 -0800 Received: by ug-out-1314.google.com with SMTP id m2so1200498ugc for ; Mon, 29 Jan 2007 07:51:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EZ76X4lkCtTBRAcX2ihM88Leew7999/NS7AriCyS/fn0K+EQ3ndE5dHvNaR08N1MNPi7nBFGpPFMTodbmWYEb7PbEkH6V0/+lLo5d9vZsMXgrnZSrBnIuyZOteLX8U6Ky9rXzoj57yquu4YqKZMrx6w5D7d0IM9eGZ43fP96DC0= Received: by 10.67.119.9 with SMTP id w9mr8761836ugm.1170085862428; Mon, 29 Jan 2007 07:51:02 -0800 (PST) Received: by 10.66.221.12 with HTTP; Mon, 29 Jan 2007 07:51:02 -0800 (PST) Message-ID: <46d2280d0701290751x71c187f5v93ea1254d91d43c4@mail.gmail.com> Date: Mon, 29 Jan 2007 19:51:02 +0400 From: "Koka Kiknadze" <226057@gmail.com> To: user-java@ibatis.apache.org Subject: Re: column vs columnIndex In-Reply-To: <16178eb10701281139i4454e9fara7258fccf6559c1f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_71403_31898787.1170085862094" References: <46d2280d0701280636q385cc028l3cb29d937cbf8785@mail.gmail.com> <16178eb10701281138n6e4eeca8g2c7e16b7e5341b6e@mail.gmail.com> <16178eb10701281139i4454e9fara7258fccf6559c1f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_71403_31898787.1170085862094 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/28/07, Clinton Begin wrote: > > PS: Yes you can use column names with the resultMaps too, which should add > very little overhead. But it's up to the driver at that point. > Yes, you are definitely right. Drilled down to see that difference arises because OracleResultSet getString(String) is much slower compared to getString(int) with oracle JDBC driver (around 400ms vs 2100 ms in my profiling session). Obviously other databases (column name case-insensitive ones) will also have to invoke equalsIgnorCase-toUpperCase which slow the things down. The difference is negligible, unless you are retrieving thousands of rows and I think we can stand using columnIndex-es for couple of queries only :). ------=_Part_71403_31898787.1170085862094 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/28/07, Clinton Begin <clinton.begin@gmail.com> wrote:
PS: Yes you can use column names with the resultMaps too, which should add very little overhead.  But it's up to the driver at that point.


Yes, you are definitely right. Drilled down to see that difference arises because OracleResultSet getString(String) is much slower compared to getString(int) with oracle JDBC driver (around 400ms vs 2100 ms in my profiling session). Obviously other databases (column name case-insensitive ones) will also have to invoke equalsIgnorCase-toUpperCase which slow the things down.

The difference is negligible, unless you are retrieving thousands of rows and I think we can stand using columnIndex-es for couple of queries only :).


------=_Part_71403_31898787.1170085862094--