JDBC connection slow when MSSQL installed on remote server

%3CLINGO-SUB%20id%3D%22lingo-sub-758596%22%20slang%3D%22en-US%22%3EJDBC%20connection%20slow%20when%20MSSQL%20installed%20on%20remote%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758596%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20to%20all%20members%2C%3CBR%20%2F%3Ewe%20are%20developing%20web%20applications%20that%20use%20SQL%20Server%202016%20(Express)%20as%20a%20database%20engine.%20We%20have%20noticed%20that%20the%20queries%20we%20make%20from%20application%20side%20take%26nbsp%3B%2020-30ms%20(average)%20when%20MSSQL%20is%20installed%20locally%20while%2C%26nbsp%3Bif%20installed%20on%20a%20remote%20machine%2C%20it%20take%20500-600ms%20.%20We%20tried%20different%20versions%20of%20JDBC%20(now%20version%207.2.2)%20but%20the%20timing%20is%20the%20same.%20Both%20PC%20are%20connected%20on%20same%20switch.%3CBR%20%2F%3EThe%20connection%20string%20we%20use%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ejdbc%3Asqlserver%3A%2F%2F%24%7Bdatabase.address%7D%3BSelectMethod%3Dcursor%3Bdatabase%3D%24%7Bdatabase.name%7D%3BuseUnicode%3Dtrue%3BcharacterEncoding%3DUTF-8%3BcharactetrResultSets%3DUTF-8%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewe%20tried%20to%20delete%20%22SelectMethod%3Dcursor%3B%22%20and%20the%20timing%20improve%20but%20not%20significantly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20not%20a%20DNS%20problem%20because%20as%20address%20we%20use%20the%20IP.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20tell%20me%20how%20to%20solve%20the%20problem%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot%3C%2FP%3E%3CP%3EGiovanni%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Visitor

Hello to all members,
we are developing web applications that use SQL Server 2016 (Express) as a database engine. We have noticed that the queries we make from application side take  20-30ms (average) when MSSQL is installed locally while, if installed on a remote machine, it take 500-600ms . We tried different versions of JDBC (now version 7.2.2) but the timing is the same. Both PC are connected on same switch.
The connection string we use is:

 

jdbc:sqlserver://${database.address};SelectMethod=cursor;database=${database.name};useUnicode=true;characterEncoding=UTF-8;charactetrResultSets=UTF-8

 

we tried to delete "SelectMethod=cursor;" and the timing improve but not significantly.

 

It is not a DNS problem because as address we use the IP.

 

Can someone tell me how to solve the problem?

 

Thanks a lot

Giovanni

0 Replies