ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: column vs columnIndex
Date Sun, 28 Jan 2007 19:38:05 GMT
toUpperCase is ONLY used with auto-mapping.  So if performance is you #1
concern, you can also use explicit result maps....

So instead of:

<select ... resultClass="MyType" ...>

Use:

<resultMap id="myResultMap".... class="MyType" ...>
<select ... resultMap="myResultMap" ...>

Cheers,
Clinton

On 1/28/07, Koka Kiknadze <226057@gmail.com> wrote:
>
> We work with in-memory database and I was very pleased to see that iBatis
> adds almost no overhead compared to pure JDBC except when we use
> column="someColumn" in our resultmaps. So we have to use columnIndex which,
> of course, is a bit too inconvenient.
>
> Simple profiling hints that the difference arises because of multiple
> calls to Character.toUpperCase. I suspect those calls are to match
> database column by name. If it's correct, may ask for a feature that will
> accelerate using column names, say, by translating all column names into
> indexes and caching them at first execution of queryForXXX, so that next
> executions will not need any string comparisons?
>
> TYA
>

Mime
View raw message