sql server parameter sniffing

i was using PreparedStatement to load some data out of sql database, which has been working fine for quite some time. Till recently, for one day’s data, the query is not able to finish (hang on reading the response from database)

"stackTrace": [ { "methodName": "socketRead0", "fileName": "SocketInputStream.java", "lineNumber": -2, "className": "java.net.SocketInputStream", "nativeMethod": true }, { "methodName": "socketRead", "fileName": "SocketInputStream.java", "lineNumber": 116, "className": "java.net.SocketInputStream", "nativeMethod": false }, { "methodName": "read"…