Well you can go the $$ way as Larry indicated, but he also did warn you ;)

What I liked in iBatis from the very start was that it's ME who controls all
the sql and I can add optimizer hints  in iBatis <select> statements. I use
Oracle, but hope the following applies to DB2 too:  I'd try including hints
in the first place (of course if your problem persists after recomputing
database stats)

GL

On 5/11/07, Tom Henricksen <[EMAIL PROTECTED]> 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.

Reply via email to