ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koka Kiknadze" <226...@gmail.com>
Subject Re: column vs columnIndex
Date Mon, 29 Jan 2007 15:51:02 GMT
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 :).

View raw message