java - Creating a connection with Microsoft's JDBC driver is 3 times faster than with jTDS -


i googled lot can't figure out reason of strange behaviour. i'm using microsoft sql server 2012 windows authentication. i'm connecting that:

try {   class.forname("com.microsoft.sqlserver.jdbc.sqlserverdriver");   conn = drivermanager.getconnection("jdbc:sqlserver://my-pc:1433;databasename=database;integratedsecurity=true"); } catch (exception e) {   system.out.println("failed" + e.getmessage());   e.printstacktrace(); } 

this connection aproximately 3 times faster when use jtds driver (and add .jar project library , on) net.sourceforge.jtds.jdbc.driver , appropriate connection string (jdbc:jtds:sqlserver://my-pc:1433/database;instance=sqlexpress).

does know why? read jtds driver faster sqldbc drivers, don't know i'm doing wrong.

thank you

jtds driver has lot of improvements related way queries work after connection made. benchmark not mention initial connection speed: http://jtds.sourceforge.net/benchtest.html. measure operations executed after connection active.

i suspect connection initialization code slower other drivers. that's why worth keeping connection pool of precreated connections maximum performance. in fact it's true driver.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -