I run a query from my applications. It may cost 3 or 4 minutes. Then, I checked the sql from logs and run it directly on the db server(DB2,9.7).It was so fast, less than 1 seconds.
It's prd environment and I cannot get the entire environments. As i know, the programming-language is java, and Mybatis they use. The sql limits fetching first 1000 rows and it started to be slow from last week, after we build an index to optimize another query.
We click the other interface buttons and we get results so fast(less then 1 seconds after clicking button).So I think the network is ok.
I am sure that two sqls are the same.