Used net.sourceforge.jtds.jdbc.Driver as my driver from MSSQL for all my applications. I had performance issues in the prepared statement, and I found out that sendStringParametersAsUnicode = false should fix this problem. Unfortunately, I cannot force the driver to accept the value. I can get the Microsoft com.microsoft.sqlserver.jdbc.SQLServerDriver driver to accept the parameter just fine:
jdbc:sqlserver://servername:1433;databaseName=dbname;sendStringParametersAsUnicode=false
works in persistence.xml and in my ds.xml. Prepared applications go fast, 100 in 22 seconds.
However, I cannot get the same performance boost from JTDS. It still hangs around the prepared statement, taking a few seconds at each iteration.
I tried several line options and saw the same lag in my tests (persistence.xml with Hibernate.connection.url) and Server with JTA and ds.xml.
jdbc:jtds:sqlserver://server:1433/dbname;sendStringParametersAsUnicode=false jdbc:jtds:sqlserver://server:1433;sendStringParametersAsUnicode=false;databaseName=dbname jdbc:jtds:sqlserver://server:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;socketKeepAlive=true;databaseName=dbname
All that I read suggests that the Microsoft driver is slower, and my company had problems with it in the past. I would really like to use JTDS, if possible, but I canโt wait for the prepared statement within 10 seconds!
Anyone got any ideas?
thanks
source share