Groups | Blog | Home
all groups > sql server data warehouse > april 2005 >

sql server data warehouse : Merge Large Tables


Shawn Meyer
4/14/2005 11:25:27 AM
What is the best way to merge two really large tables (7,000,000 rows each,
and very wide)?
The table definitions are the same for both tables.
Right now I am using a insert into statement with a selection from one table
at a time, but it takes way too long. I don't need it to be logged. A all
or nothing result is fine for me. I don't think DTS is an option because I
need to run this from a C# app. I think my only other option is using the
BCP api to select the data and load it into the new table, but this just
seems like the wrong way to go.
Any other ways to go with this?

Shawn

Ray
4/17/2005 12:00:00 AM
Select *
into [NewTable]
From
Select * [Table1]
Union All
Select * [Table2]



[quoted text, click to view]

AddThis Social Bookmark Button