JDBC adapter service hanging for DB2

My JDBC adapter service for DB2 database is getting hanged. Its running since 12 hrs and had to restart IS to stop the process.
Its a custom SQL -
select a, b, c, d from table1 where b in (select x from table2).

But when I am running the service for one table, its working fine. Exmale - both the SQLs below are running fine.
select a,b,c,d from table1
select x from table2

but its hanging when I am joining these two tables (1st SQL).
Could anybody pls let me know the possible reason and remedy.

Appreciate any help.
Thanks

Sounds like you need DBA to help you tun the SQL. JDBC Adapter can’t help overcome inefficient or poorly performing queries.

Work with a DBA to tune the query adding indexes if needed. Once it runs efficiently outside of IS, your adapter service should also work.

Mark