Try to set a statement timeout and see which part of code/application fails when this query is timed-out.
Will that be a logical way to figure out from where the query is being fired?
Yes, that makes sense, but unfortunately I don't have access to the system to test it. I did test all the queries that were written in the code I was given and none of them created SELECT * FROM queries, so I also suspected it was somewhere in the stack but was unable to learn what the code is being run in besides just being told its pasqual and ODBC. Hopefully it won't be a problem.