Distributed Transaction query: which version is faster?

  • Hi,

    I'm moving data from table on Server A to table on Server B.

    Which SQL query will be faster? Option A runs from source server, Option B runs on destination server.


    Option A runs on server A:

     
    INSERT INTO B.destination.dbo.table
    (field1)
    SELECT field1
    FROM dbo.source

    Option B runs on server B

     
    INSERT INTO dbo.table
    (field1)
    SELECT field1
    FROM OPENQUERY(A, 'SELECT field1 from dbo.table')


    The difference here is that the first option will update remote table, while the second option will read from remote source.

    Regards,

    Geert

  • My guess is that updating a local table from a remote query (Option B) would be faster.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

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

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