Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Programming / Connectivity / January 2006

Tip: Looking for answers? Try searching our database.

SQL Server very slow over internet...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hurricane_number_one@yahoo.com - 26 Jan 2006 22:45 GMT
I have an application that uses SQL Server and can be run on mutiple
computers over a local area network.  One of my clients has requested
to have SQL Server running at their main office and have each client
machine at a different location connecting to SQL Server over the
internet.  I have been able to set this up fine by just pointing the
client machines to the main office PC by entering the server's IP in
the client's DSN and opening up the SQL Server port on the main office
computer's firewall but restricting access to only the IPs of the
client computers.  This all works fine except that when writing large
number of records it's incredibly slow.  If I'm writing 1000+ records
in a LAN it wouldn't take very long but when I try the same over the
internet it takes so long that I thought something was wrong and gave
up waiting. I don't know how long it would take but I waited at least
30 mins and it didn't complete.  I'm using disconnected recordsets so
it should be sending all the data at once.
Any idea why it would be running so slow? I would expect some slowdown
over the internet but it is pratically non-functional.  What can I try
to speed it up??? I know the connection does work because it works fine
for smaller number of records.  Any suggestions?
Andrew J. Kelly - 27 Jan 2006 00:46 GMT
It doesn't actually send all the data at once. If you profile the event I
think you will find a series of 1000 calls to the database to do the updates
or inserts.  That's a lot of network traffic.  Is this .net?  If so how are
the updates or inserts being done?  Is it a sp? Do you have SET NOCOUNT ON
at the beginning of the SP?

Signature

Andrew J. Kelly  SQL MVP

>I have an application that uses SQL Server and can be run on mutiple
> computers over a local area network.  One of my clients has requested
[quoted text clipped - 15 lines]
> to speed it up??? I know the connection does work because it works fine
> for smaller number of records.  Any suggestions?
hurricane_number_one@yahoo.com - 27 Jan 2006 07:27 GMT
It's done in VB6.  I'm not using a SP.  I open a recordset, disconnect
it, do my additions/updates then re-connect it and use UpdateBatch,
which I thought did all the data at once.  If I were to just make one
massive insert statement, then use DBConnection.execute("INSERT
INTO.....") would that be faster?  Any other suggestions?
Thanks!
Andrew J. Kelly - 27 Jan 2006 12:25 GMT
If the reasons for the speed issues are related to so many round trips this
may in deed be faster. You might want to look at using sp's in either case
so you can get some query plan reuse. But you need to test it to see and I
would suggest running a trace to see exactly what is happening.

Signature

Andrew J. Kelly  SQL MVP

> It's done in VB6.  I'm not using a SP.  I open a recordset, disconnect
> it, do my additions/updates then re-connect it and use UpdateBatch,
> which I thought did all the data at once.  If I were to just make one
> massive insert statement, then use DBConnection.execute("INSERT
> INTO.....") would that be faster?  Any other suggestions?
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.