dbTalk Databases Forums  

SSIS vs Linked server

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS vs Linked server in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GPage
 
Posts: n/a

Default SSIS vs Linked server - 01-07-2009 , 05:14 PM






I need to pull a table from one server into another for testing purposes. I
have a linked server setup from server A to server B and I run a query like
this:

select col1,col2,col3 into TestTable from server.database.dbo.TestTable

There are several million rows in the table and this takes about 45min to an
hour to run.

If instead I setup an SSIS package to transfer the data and use the bulk
insert mode it transfers the data in 7-10 minutes.

Since the database is in simple mode the select into statement should be
non-logged and so I don't see why there would be such a large discrepancy in
the load times.

Reply With Quote
  #2  
Old   
Russell Fields
 
Posts: n/a

Default Re: SSIS vs Linked server - 01-08-2009 , 10:19 AM






GPage,

Even though the recovery model is set to simple, row inserts still do a lot
of logging and updating. There is no "non-logged" state of a database,
simply somewhat reduced logging and quicker discarding of the transaction
log contents.

BULK INSERT actually uses another, much faster, approach to inserting data
and will always be faster for a sizeable amount of data than SELECT INTO.
It also does some logging, though.

So, the difference in timings is not surprising.

RLF


"GPage" <GPage (AT) discussions (DOT) microsoft.com> wrote

Quote:
I need to pull a table from one server into another for testing purposes. I
have a linked server setup from server A to server B and I run a query
like
this:

select col1,col2,col3 into TestTable from server.database.dbo.TestTable

There are several million rows in the table and this takes about 45min to
an
hour to run.

If instead I setup an SSIS package to transfer the data and use the bulk
insert mode it transfers the data in 7-10 minutes.

Since the database is in simple mode the select into statement should be
non-logged and so I don't see why there would be such a large discrepancy
in
the load times.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.