You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Enrique Ferreyra <ef...@gmail.com> on 2006/03/07 19:30:20 UTC

remapResults is necessary if the result query doesnt change in a execution ?

Hi , my first message :) ok, i know the performance penalties if i put 
the remapResults = true, and i understand why is necesary this when 
using $$ parameters, i think in my case is not necesary, tell me if im 
wrong.

We work whit informix and we have many instances, we try the software be 
the same setting some parameters at start for the instance choice, but 
in one instance some "table" is in "database1" and in other instance is 
in "database2", the connection is a single database, so we refer to the 
tables as 'database:table' in informix notation, now my question is if i 
make sql querys in a sqlMap like:

    <select id="get-deposito" parameterClass="java.util.HashMap" 
resultMap="get-deposito-result">
        SELECT dep_cod, dep_tip, dep_des
        FROM $depositos$
        WHERE dep_com_cod = #com_cod#
          AND dep_cod = #dep_cod#
          AND dep_tip = #dep_tip#
    </select>

And the $depositos$ value doesnt change in the current execution of the 
application, DO I NEED THE remapResults="true" ?

Thanks !

-- 
  A.U.S. Enrique Ferreyra
    Centro de Cómputos
 Red Megatone - Red Confina


Re: remapResults is necessary if the result query doesnt change in a execution ?

Posted by Ted Schrader <ts...@gmail.com>.
Hi Enrique,

I am pretty sure the answer is no, you do not need remapResults="true"
because you are using a good SQL practice by listing your columns in
the SELECT statement.  Listing your columns means the column names
won't change, even though your table name might change, so
remapResults is not necessary.

If I am wrong, then I need to make some changes to my work!

Ted

On 07/03/06, Enrique Ferreyra <ef...@gmail.com> wrote:
> Hi , my first message :) ok, i know the performance penalties if i put
> the remapResults = true, and i understand why is necesary this when
> using $$ parameters, i think in my case is not necesary, tell me if im
> wrong.
>
> We work whit informix and we have many instances, we try the software be
> the same setting some parameters at start for the instance choice, but
> in one instance some "table" is in "database1" and in other instance is
> in "database2", the connection is a single database, so we refer to the
> tables as 'database:table' in informix notation, now my question is if i
> make sql querys in a sqlMap like:
>
>     <select id="get-deposito" parameterClass="java.util.HashMap"
> resultMap="get-deposito-result">
>         SELECT dep_cod, dep_tip, dep_des
>         FROM $depositos$
>         WHERE dep_com_cod = #com_cod#
>           AND dep_cod = #dep_cod#
>           AND dep_tip = #dep_tip#
>     </select>
>
> And the $depositos$ value doesnt change in the current execution of the
> application, DO I NEED THE remapResults="true" ?
>
> Thanks !
>
> --
>   A.U.S. Enrique Ferreyra
>     Centro de Cómputos
>  Red Megatone - Red Confina
>
>