Thanks for that. I have already done that, this is why I am so confused. The queries are exactly the same... I can cut out of the p6spy log, and run in through jdbc and its fine... the only difference as far as I can see is that one runs through ibatis, the other through jdbc.
it is very very bizarre. My other test was to get the datasource from the sqlmap, get a new connection from the datasource and use that connection for the jdbc query. Result = fast query. Then, set user connection on ibatis, using the same connection. Result = slow query. Im very confused. Thanks Greg
