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.
