We had a complex query which read data from Oracle DB table with millions of records. It was observed same query when executed from a SQL client (Benthiq, SQL Developer), results popped up in a fraction of second. But when executed from our web application internally, it took minutes to execute.

Our application internally uses iBatis to fire query and get results back. We made sure after analyzing from logs that it is only a query bottleneck and not an iBatis one. Also, we insured that query plan was correct and it uses appropriate indexes while planning the execution path for the query. We went completely blanked and had no clue for this weird issue.
1
Loading