Title: Slow ibatis query

Hi all

I have a strange problem, we are using ibatis as our data access layer, and everything generally goes fine.
I recently added a query, which essentially does a "select * from X where primary_key = ?"

This query is very fast (300ms) when run externally through a database console, or using jdbc, or using direct jdbc inside jboss. even using the same connection as ibatis. But... when I run it using ibatis, it takes 4-5 seconds...

now, I stepped through the ibatis code, and everything is fast up to the point of ps.execute (where the prepared statement is executed), then everything stops for 4-5 seconds while the query is executed.

Huh? Im doing exactly the same, executing a prepared statement with my jdbc version, so what is going on? Im very confused, I don't even know where to start looking. If anyone has any ideas.... they would be gratefully received.

Thanks!
Greg

Reply via email to