Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Long running query

Author  Topic 

baru
Starting Member

1 Post

Posted - 2007-10-11 : 15:35:43
Hi Friends,

I am new to T-SQL programming... I am trying to pull data from one table which is on Server1 with row count as approx. 57000000 and insert that data to a table on server2. Its taking like 47 min to insert the data ... is there any other method that i can populate the table....

I am using simple INSERT INTO statements to populate the table...


Thanks in advance.

baru

mfemenel
Professor Frink

1421 Posts

Posted - 2007-10-11 : 19:49:23
How much space is between server 1 and 2? Same datacenter?
I would reccomend if you have any indexes on the destination table on server 2 that you drop them and stop any triggers from firing if there are any.

Mike
"oh, that monkey is going to pay"
Go to Top of Page

biswajitdas
Starting Member

44 Posts

Posted - 2007-10-11 : 21:29:30
Hi Baru

The first of all i want to knwo that instead of insert have you used BCP statement.
when you used the insert check what is the recovery mode , if the recovery mode is bulk then also it work faster in stead of full mode.

also you can used the SSIS also you can establised a linked server and transfer the data



hi i want do everything in sql
i want make it in my tips
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-10-11 : 22:42:53
Agree, better to use bcp to move 57m rows.
Go to Top of Page
   

- Advertisement -