If you see the "HS Message to agent" wait event for a long time while querying the SQL Server, first of all check that tracing is enabled and if it is enabled , disable it and rerun the statement again as tracing may cause the poor response.
I met this situation with one of the environment today where a query was taking the 4 minutes and SQL Server team confirmed that query does not take the 2 seconds to execute on the SQL Server itself. I investigated and found that tracing was On with debug option , just I remarked the related line in the TG init file (eg; E:\oracle\product\10.2.0\tg_1\tg4msql\admin\inittg4msql.ora) as below
#HS_FDS_TRACE_LEVEL=debug
and query returned the results in few seconds rather than 4 minutes.