ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: iBatis without Bind variables?
Date Fri, 11 May 2007 04:08:24 GMT
Use $this$ instead of #this# and you'll get subsitution instead of
parameterization - but be careful, you are responsible for all
escaping and type conversion, and opening yourself up to SQL
injection. Unless you are VERY sure that you need to do this...look
for a better solution.

Larry


On 5/10/07, Tom Henricksen <TomH@a-t-g.com> wrote:
>
>
>
>
> We have a query that is running very slow when running through iBatis
> against DB2.  If we pull that query and run through Aqua Data studio with
> raw SQL (w/o bind variables) it runs fast.  It seems that DB2 is picking a
> different query plan with the bind variables then when we use raw SQL.  We
> even went to test iBatis vs JDBC with Bind variables and JDBC w/o Bind
> variables.  And iBatis and JDBC with Bind variables were both slow were JDBC
> w/o bind variables was fast.  Is it possible to run iBatis w/o bind
> variables?  I would doubt it, just wondering if others have run into similar
> problems and if you had any suggestions. I understand bind variables are a
> good thing.  This just seems like the exception to the rule where they or
> the database isn't doing the correct thing.
>
>
>
> Thanks,
>
>
>
> Tom Henricksen
>  Consultant
>  Advanced Technologies Group, Inc.

Mime
View raw message