Strange insert time

  • Hi, folks

    I have to migrate our company SQL server to Germany. I have new SQL server 2014 installed in Germany and I started to transfer databases and applications. I noticed strange behaviour....

    I have same database on local SQL and also remote SQL in GE.

    Login at local SQL and command run from local SQL

    Insert into DE SQL server – read from local server - tooks 00:01:54

    INSERT INTO [DENU00CL0042].ADCList.[dbo].[Company_TEST]

    SELECT * FROM [dbo].[Company]

    Insert into local SQL server – read from DE SQL server - tooks 00:00:01

    INSERT INTO [Company2_TEST]

    SELECT * FROM [DENU00CL0042].ADCList.[dbo].[Company_TEST]

    Login at GE SQL, command run from GE SQL:

    Insert into local SQL server – read from DE SQL server - tooks 00:02:00

    INSERT INTO [SKBA1S1846].ADCList.[dbo].[Company_TEST]

    SELECT * FROM [dbo].[Company]

    Insert into DE SQL server – read from local SQL server - tooks 00:00:01

    INSERT INTO [Company2_TEST]

    SELECT * FROM [SKBA1S1846].ADCList.[dbo].[Company_TEST]

    In another words PUSH the data and write to other SQL server is more than 150x slower than let the other server PULL the data and write it down. Why? Is any possibility to solve this situation? I also found, that PUSH makes lot of small packets (300) in the WAN network, but PULL is using network packet size of 4096.

    Many thanx

    Robert

  • Check this article out, pretty much gives you the run down. Direction matters!

    http://sqlblog.com/blogs/linchi_shea/archive/2010/12/01/linked-server-and-performance-impact-direction-matters.aspx

  • Have you tried using SSIS? It's great for this sort of things.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply