Problem got resolved after setting following property in the jdbc url : sendStringParametersAsUnicode=false
for example : jdbc:sqlserver://server;instanceName=yourInstance;databaseName=yourDBName;sendStringParametersAsUnicode=false;
Thank you.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In our application the query execution taking 3565ms of avg. time, when same query is executed directly in DB it is taking only 205ms of avg. From the thread dump it is noticed that socketRead is taking 80% time of execution.
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:401)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:204)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:224)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2713)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7344)
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:479)
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:546)
com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7738)
com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6494)
com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1983)
java.net.SocketInputStream.read(SocketInputStream.java:141)
java.net.SocketInputStream.read(SocketInputStream.java:170)
java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
java.net.SocketInputStream.socketRead0(Native Method)
Is there any way to reduce this time?
Problem got resolved after setting following property in the jdbc url : sendStringParametersAsUnicode=false
for example : jdbc:sqlserver://server;instanceName=yourInstance;databaseName=yourDBName;sendStringParametersAsUnicode=false;
Thank you.